mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
Document all the events
This commit is contained in:
@@ -28,4 +28,12 @@ class ChannelUpdateAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted whenever a channel is updated - e.g. name change, topic change.
|
||||
*
|
||||
* @event Client#channelUpdate
|
||||
* @param {Channel} oldChannel the channel before the update
|
||||
* @param {Channel} newChannel the channel after the update
|
||||
*/
|
||||
|
||||
module.exports = ChannelUpdateAction;
|
||||
|
||||
@@ -46,4 +46,11 @@ class GuildDeleteAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted whenever a guild becomes unavailable, likely due to a server outage.
|
||||
*
|
||||
* @event Client#guildUnavailable
|
||||
* @param {Guild} guild the guild that has become unavailable.
|
||||
*/
|
||||
|
||||
module.exports = GuildDeleteAction;
|
||||
|
||||
@@ -45,4 +45,14 @@ class GuildMemberRemoveAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Emitted whenever a member leaves a guild, or is kicked.
|
||||
*
|
||||
* @event Client#guildMemberRemove
|
||||
* @param {Guild} guild the guild that the member has left.
|
||||
* @param {GuildMember} member the member that has left the guild.
|
||||
*/
|
||||
|
||||
|
||||
module.exports = GuildMemberRemoveAction;
|
||||
|
||||
@@ -28,4 +28,14 @@ class GuildRoleCreate extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Emitted whenever a guild role is created.
|
||||
*
|
||||
* @event Client#guildRoleCreate
|
||||
* @param {Guild} guild the guild that the role was created in.
|
||||
* @param {Role} role the role that was created.
|
||||
*/
|
||||
|
||||
|
||||
module.exports = GuildRoleCreate;
|
||||
|
||||
@@ -44,4 +44,12 @@ class GuildRoleDeleteAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted whenever a guild role is deleted.
|
||||
*
|
||||
* @event Client#guildRoleDelete
|
||||
* @param {Guild} guild the guild that the role was deleted in.
|
||||
* @param {Role} role the role that was deleted.
|
||||
*/
|
||||
|
||||
module.exports = GuildRoleDeleteAction;
|
||||
|
||||
@@ -33,4 +33,13 @@ class GuildRoleUpdateAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted whenever a guild role is updated.
|
||||
*
|
||||
* @event Client#guildRoleUpdated
|
||||
* @param {Guild} guild the guild that the role was updated in.
|
||||
* @param {Role} oldRole the role before the update.
|
||||
* @param {Role} newRole the role after the update.
|
||||
*/
|
||||
|
||||
module.exports = GuildRoleUpdateAction;
|
||||
|
||||
@@ -35,4 +35,12 @@ class GuildUpdateAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted whenever a guild is updated - e.g. name change.
|
||||
*
|
||||
* @event Client#guildUpdate
|
||||
* @param {Guild} oldGuild the guild before the update.
|
||||
* @param {Guild} newGuild the guild after the update.
|
||||
*/
|
||||
|
||||
module.exports = GuildUpdateAction;
|
||||
|
||||
@@ -33,4 +33,12 @@ class MessageUpdateAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted whenever a message is updated - e.g. embed or content change.
|
||||
*
|
||||
* @event Client#messageUpdate
|
||||
* @param {Message} oldMessage the message before the update.
|
||||
* @param {Message} newMessage the message after the update.
|
||||
*/
|
||||
|
||||
module.exports = MessageUpdateAction;
|
||||
|
||||
@@ -33,4 +33,12 @@ class UserUpdateAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted whenever a detail of the logged in User changes - e.g. username.
|
||||
*
|
||||
* @event Client#userUpdate
|
||||
* @param {ClientUser} oldClientUser the client user before the update.
|
||||
* @param {ClientUser} newClientUser the client user after the update.
|
||||
*/
|
||||
|
||||
module.exports = UserUpdateAction;
|
||||
|
||||
Reference in New Issue
Block a user