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:
@@ -7,16 +7,15 @@ class ChannelCreateAction extends Action {
|
||||
const existing = client.channels.has(data.id);
|
||||
const channel = client.channels.add(data);
|
||||
if (!existing && channel) {
|
||||
/**
|
||||
* Emitted whenever a channel is created.
|
||||
* @event Client#channelCreate
|
||||
* @param {DMChannel|GroupDMChannel|GuildChannel} channel The channel that was created
|
||||
*/
|
||||
client.emit(Events.CHANNEL_CREATE, channel);
|
||||
}
|
||||
return { channel };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted whenever a channel is created.
|
||||
* @event Client#channelCreate
|
||||
* @param {GroupDMChannel|GuildChannel} channel The channel that was created
|
||||
*/
|
||||
|
||||
module.exports = ChannelCreateAction;
|
||||
|
||||
Reference in New Issue
Block a user