Every Discord event DiSky can listen to. Each event exposes event-values
(accessed by type) and event-scoped expressions you can use inside its handler.
Fired when a slash, user or message command declared by a structure is used while its 'cooldown' is still running. 'remaining cooldown' is the time left. It is also the event the 'on cooldown:' section of the structure runs in. Cancelling it lets the command run anyway. The interaction still has to be answered: reply to it here, or cancel the event and let the trigger answer.
Fired when an automated automod response has been triggered through an automod Rule. Can be used to get the channel, user content, keyword that was found, the automod response and the id of the automod rule, the user, the id of the message which triggered the rule, the guild it occurred in, and the id of the alert message sent to the alert channel (if configured).
Fired when the bot joins a new guild/server. This event is useful for setting up initial configurations when the bot enters a new server, such as adding default roles, sending welcome messages, or initializing server-specific settings.
Fired when the bot leaves a guild/server. This event can be used for cleanup operations or logging when the bot is removed from a server, either by being kicked, the server being deleted, or the bot owner removing it manually.
Fired when a bot is fully loaded and connected to Discord. This event is triggered once all guilds are ready and the bot's connection to Discord is completely established. This is the ideal event to use for initialization code that needs to run once when the bot starts up, such as scheduling tasks or initializing resources.
Fired when a bot is shutting down or being stopped. This event is triggered when the bot's connection to Discord is closing, which can happen during server restarts, plugin reloads, or manual bot shutdowns. It provides an opportunity to perform cleanup operations or save data before the bot goes offline.
Fired when any button sent by the bot is clicked. You can use the `clicked id` to get the clicked button id, and `event-button` is the clicked button itself. !!! info "Modal can be shown in this interaction!"
Fired when a 'discord command' was recognised but refused: wrong channel, missing role or permission, cooldown, wrong bot or invalid arguments. 'failure reason' tells which ("invalid arguments", "wrong channel", "missing role", "missing permission", "cooldown", "wrong bot"); 'remaining cooldown' is set for a cooldown. The configured 'permission message' / 'cooldown message' / 'usage message' of the command is sent before this event fires; use this event for anything more custom.
Fired when a message matches a 'discord command' structure, before its checks (channel, roles, permissions, cooldown) and before its trigger runs. Cancel it to stop the command entirely. 'event-discordcommand' is the command, 'used prefix' / 'used alias' / 'used arguments' tell how it was typed.
Fired on the main thread for every DiSky error that no 'try' block caught: a failed Discord request, a missing permission, a refused builder, an effect used in the wrong event. An error raised inside a 'try' block goes to its 'catch' and never reaches this event. Cancel the event to keep DiSky from printing the error to the console; cancel it before any 'wait' or Discord effect, the console decision is taken as soon as the trigger pauses. 'event-bot' is set when the error comes from a trigger of a DiSky event, and is empty otherwise (a request queued without a trigger behind it does not know its bot), so a 'seen by' filter only matches the errors whose bot is known. An error raised by this event's own trigger is printed and does not fire the event again.
Fired when a user selects one or more entities in an entity dropdown menu. This event provides access to the selected entities (users, roles, channels, etc.). Don't forget to either reply to or defer the interaction to acknowledge it. You can show a modal in response to this interaction.
Fired when a guild is fully loaded and all its data is accessible. This event occurs for each guild the bot is connected to when starting up. It's fired before the global Ready event and indicates that guild-specific data like members, channels, and roles have been loaded and are available for use.
Fired when a user is banned from a guild. A member doesn't exist here because the member is not in the guild anymore! Can be used to get the banned user, the author and the guild.
Fired when someone or something adds a sticker to a guild. For this event to work, the `sticker` cache flag and `guild expressions` intent are required.
Fired when someone or something removes a sticker from a guild. For this event to work, the `sticker` cache flag and `guild expressions` intent are required.
Fired when a member's mute status changes for any reason (self-mute or server-mute). Use `event-boolean` to check whether the member is now muted (true) or unmuted (false). To listen only to server-initiated mutes, use the Guild Voice Server Mute Event instead.
Fired when a member requests to speak in a stage channel. Can be used to track moderation actions in voice channels. You may use `event-boolean` to check if the state is true (user requested to speak) or false (user cancelled the request).
Fired when a member is server-muted or server-unmuted by a guild moderator. Unlike the Guild Voice Mute Event, this ONLY fires for guild-initiated (server) mutes, not self-mutes. Use `event-boolean` to check whether the member is now server-muted (true) or server-unmuted (false).
Fired when a member starts or stops streaming in a voice channel. Can be used to track moderation actions in voice channels. You may use `event-boolean` to check if the state is true (user started streaming) or false (user stopped streaming). !!! warning "This **DOES NOT** include camera! Use the `GuildVoice Video Event` for that."
Fired when a member starts or stops its camera in a voice channel. Can be used to track moderation actions in voice channels. You may use `event-boolean` to check if the state is true (user started its camera) or false (user stopped its camera). !!! warning "This **DOES NOT** include streams! Use the `Guild Voice Stream Event` instead."
Fired when a member has agreed to membership screen requirements. This can be useful for adding roles since the member is not fully available until they've accepted the screen requirements.
Fired when someone click on a message application command. Use `used command` to get the command name and `target message` for the targeted message. Don't forget to either reply to the interaction. Defer doesn't work here.
Fired when any message is deleted. This will be fired, by default, both guild & private messages, use the 'event is from guild' condition to avoid confusion.
Fired when any message is edited / updated. This will be fired, by default, both guild & private messages, use the 'event is from guild' condition to avoid confusion.
Fired when a modal has been sent to the bot from any user. Use 'received modal' to get the modal id. Don't forget to either reply or defer the interaction. !!! warning "Modal can NOT be shown in this interaction!"
Fired when a message, that can be seen by the bot, receive a reaction. This will be fired, by default, both guild & private messages, use the 'event is from guild' condition to avoid confusion.
Fired when an user remove a reaction from a specific message. This will be fired, by default, both guild & private messages, use the 'event is from guild' condition to avoid confusion.
Fired when an user remove every reactions from a message. This will be fired, by default, both guild & private messages, use the 'event is from guild' condition to avoid confusion.
Fired when a member receives new roles. This is a log action, so event-author returns who made the action and event-roles returns a list of added roles.
Fired when roles are removed from a member. This is a log action, so event-author returns who made the action and event-roles returns a list of removed roles.
Fired when the color of a role changes. This event provides access to both the old and new colors of the role. It can be used for tracking aesthetic changes to roles or for synchronization systems.
Fired when a new role is created in a guild. This event provides access to the newly created role and the guild it belongs to. It's useful for tracking administrative changes or implementing role management systems.
Fired when a role is deleted from a guild. This event provides access to the deleted role and the guild it belonged to. It can be used for auditing purposes or to trigger cleanup actions in your bot.
Fired when the hoisted status of a role changes. Hoisted roles are displayed separately in the member list. This event provides access to both the old and new hoisted states. It's useful for tracking changes to role visibility in the member sidebar.
Fired when the icon of a role changes. This event provides access to both the old and new icon URLs. It can be used for tracking visual changes to roles or updating external systems.
Fired when the mentionable status of a role changes. This event tracks whether a role can be mentioned by regular users. It provides access to both the old and new mentionable states. It's useful for tracking changes that affect role notifications and visibility.
Fired when the name of a role changes. This event provides access to both the old and new names of the role. It's useful for tracking role identity changes or updating external systems that reference roles by name.
[discord][guild] role permission[s] (update|change)
Fired when the permissions of a role change. This event provides access to both the old and new permission sets. It's crucial for security monitoring, permission auditing, and tracking administrative changes.
[the] (old|past) role permission[s]list of Permission
Helpful?
eventsince 5.0.0-a1
[discord][guild] role position (update|change)
Fired when the position of a role changes in the role hierarchy. This event provides access to both the old and new positions. It's useful for tracking changes to the role hierarchy that may affect permissions.
Fired when a scheduled event's cover image is changed. The old/new values are image URLs (or absent if no image is set). Requires the SCHEDULED_EVENTS intent and the SCHEDULED_EVENTS cache flag to be enabled.
Fired when a scheduled event is created in a guild. Can be used to get the scheduled event and the guild it was created in. Requires the SCHEDULED_EVENTS intent and the SCHEDULED_EVENTS cache flag to be enabled.
Fired when a scheduled event is deleted from a guild. Can be used to get the scheduled event and the guild it was deleted from. Requires the SCHEDULED_EVENTS intent and the SCHEDULED_EVENTS cache flag to be enabled.
Fired when a scheduled event's end time is changed. The old or new value may be absent if the event has no defined end time. Requires the SCHEDULED_EVENTS intent and the SCHEDULED_EVENTS cache flag to be enabled.
Fired when a scheduled event's location is changed. For external events this is a free-form string; for channel-bound events it is the channel ID as a string. Use 'event-channel' to access the new channel if the event is bound to a channel. Requires the SCHEDULED_EVENTS intent and the SCHEDULED_EVENTS cache flag to be enabled.
[discord] scheduled[( |-)]event status (change|update)
Fired when a scheduled event's status changes between: scheduled, active, completed, cancelled. This is how you detect when an event actually starts (status becomes 'active') or ends (status becomes 'completed'). Requires the SCHEDULED_EVENTS intent and the SCHEDULED_EVENTS cache flag to be enabled.
[discord] scheduled[( |-)]event user (add|subscribe|join)
Fired when a user subscribes (RSVPs as 'interested') to a scheduled event. The user/member may not be present if not cached. Requires the SCHEDULED_EVENTS intent and the SCHEDULED_EVENTS cache flag to be enabled.
[discord] scheduled[( |-)]event user (remove|unsubscribe|leave)
Fired when a user unsubscribes from a scheduled event. The user/member may not be present if not cached. Requires the SCHEDULED_EVENTS intent and the SCHEDULED_EVENTS cache flag to be enabled.
Fired when a user execute a specific slash command. Use 'used command' to get the command name. Don't forget to either reply or defer the interaction, You can only defer using the wait pattern e.g: 'defer the interaction and wait [silently]. You can get value of arguments using 'argument "name" as string' for example.
Fired when Discord requests argument autocompletion for a slash command. Use 'event-string' to get the command name. Use the 'return' effect to provide completion choices to the user. You can access the focused argument with 'current argument' and other argument values with 'argument "name" as type'.
Fired when a user selects one or more choices in a string dropdown menu. This event provides access to the selected string values and dropdown details. Don't forget to either reply to or defer the interaction to acknowledge it. You can show a modal in response to this interaction.
Fired when someone click on a user application command. Use `used command` to get the command name and `target user` for the targeted user. Don't forget to either reply to the interaction. Defer doesn't work here.
Fired when a user stops an activity in a guild. Activities include playing games, listening to music, streaming, or custom status messages. This event requires the 'guild presences' intent and the 'activity' cache flag to be enabled. Note: to check whether an activity actually concluded (vs. was replaced due to a property update), iterate the member's current activities and check if one with the same type still exists.
Fired when a user changes their activity order. This event is triggered when a user starts a new activity or changes between activities. Activities include playing games, listening to music, streaming, or custom status messages.
Fired when a user starts a new activity in a guild. Activities include playing games, listening to music, streaming, or custom status messages. This event requires the 'guild presences' intent and the 'activity' cache flag to be enabled. Note: when a stream's title changes, a start event is fired before an end event to replace the activity.
Fired when a user changes their avatar. This event provides access to both the old and new avatar URLs. It can be used for monitoring profile changes or updating cached user information.
Fired when a user changes their discriminator. The discriminator is the four-digit number following a username (e.g., #1234). This event provides access to both the old and new discriminator values. Note: With Discord's migration to the new username system, this event may become less relevant.
Fired when a user changes their global display name. This event provides access to both the old and new global names. With Discord's new username system, this tracks the display name shown across all servers.
Fired when a user changes their username (not nickname). This event provides access to both the old and new usernames. It can be used for monitoring identity changes or updating user databases.
Fired when a user changes their online status. This event provides access to both the old and new online status values. It can be used for tracking user presence, activity patterns, or triggering actions when users come online.
Fired when a user changes their primary guild. This event provides access to both the old and new primary guilds. The primary guild is the server that appears as the user's main server on their profile.
Fired when a user starts typing in a channel. This event is triggered when the typing indicator appears for a user. It can be used to detect activity in channels or for interactive bot responses.