mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
docs: move event docstrings to the emitting line of code
This commit is contained in:
@@ -9,16 +9,16 @@ class GuildRoleCreate extends Action {
|
||||
if (guild) {
|
||||
const already = guild.roles.has(data.role.id);
|
||||
role = guild.roles.add(data.role);
|
||||
/**
|
||||
* Emitted whenever a role is created.
|
||||
* @event Client#roleCreate
|
||||
* @param {Role} role The role that was created
|
||||
*/
|
||||
if (!already) client.emit(Events.GUILD_ROLE_CREATE, role);
|
||||
}
|
||||
return { role };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted whenever a role is created.
|
||||
* @event Client#roleCreate
|
||||
* @param {Role} role The role that was created
|
||||
*/
|
||||
|
||||
module.exports = GuildRoleCreate;
|
||||
|
||||
Reference in New Issue
Block a user