docs: move event docstrings to the emitting line of code

This commit is contained in:
SpaceEEC
2018-11-27 21:28:36 +01:00
parent 1d1b3f25e1
commit fd21bbb7bf
21 changed files with 109 additions and 103 deletions

View File

@@ -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;