Events
Information: Retrieve-Values
For some event, you can see a retrieve values
section. Some values are given by Discord directly, and others needs another request to Discord to get the value (those are in as retrieve values
).
For instance in the Reaction Add Event, Discord gives us the message ID only, so you can use its retrieve value to get the actual message:
On Bot Creation Structure
No description provided.
On Member Kick
Fired when a member is kicked from a guild. This use a "tricky" way to get the kicked member, since the member is not in the guild anymore, so this event requires some preparation:
Requirements
- The
guild members
intent to be enabled - The
guild moderation
intent to be enabled - Target (the one who was kicked) and author (the one who kicked) members to be cached
Note
event-user
represent the kicked member (as it's not a member anymore, it's a user)event-member
represent the author (the one who kicked the member)- There's no possible way to get the reason of the kick, as Discord doesn't provide it at all
event-guild
event-user
(the kicked member)event-member
(the author)event-bot
On Member Ban
Fired when a member is banned from a guild. This use a "tricky" way to get the banned member, since the member is not in the guild anymore, so this event requires some preparation:
Requirements
- The
guild members
intent to be enabled - The
guild moderation
intent to be enabled - Target (the one who was banned) and author (the one who banned) members to be cached
Note
event-user
represent the banned member (as it's not a member anymore, it's a user)event-member
represent the author (the one who banned the member)- There's no possible way to get the reason of the ban, as Discord doesn't provide it at all
event-guild
event-user
(the banned member)event-member
(the author)event-bot
On Member Timeout
Fired when a member is timed out in a guild, that means he can't write messages/join voice channels/reacts for a certain amount of time.
This event does not fire for automatic time out expiration! (it must be done manually by a moderator to fire this event)
Requirements
- The
guild members
intent to be enabled - The
guild moderation
intent to be enabled - The cache policy to have the target member cached
on member timeout:
retrieve event value "author" and store it in {_author}
if future date is set: # it's a timeout
broadcast "%event-user% has been timed out from %event-guild% by %{_author}% until %future date%!"
else: # it's a timeout removal
broadcast "%event-user% has been untimed out from %event-guild% by %{_author}% (was previously timed out until %event-date%)!"
event-guild
event-user
(the timed out user)event-member
(the timed out member)event-bot
event-date
ornew event-date
(to get the new timeout date)past event-date
(to get the previous timeout date)
author
(to get the author of the timeout)
On Discord Command
Custom DiSky discord command system. Arguments works like the normal skript's one and accept both optional and require arguments.
On Disky Command
Fired when a disky/discord command is executed.
On Bot Join Event
Fired when any bot join a new guild.
On Bot Leave Event
Fired when any bot leave a guild.
On Shutdown Event
Fired when a bot is stopped.
On Channel Create Event
Fired when a channel is created in a guild.
On Guild Ready Event
Fired when a guild is fully loaded.
On Ready Event
Fired when a bot is fully loaded. 'guild ready' should be called before this one.
On DiSky Error / Exception
Fired when any DiSky error occur. Since DiSky exception are per-event only, this regroup every exception occurred in every events.
On Guild AFK Channel Event
Fired when a afk channel of a guild changes can be used to get the old/new channel, the author and the guild.
On Guild AFK Timeout Event
Fired when a afk timeout of a guild changes can be used to get the old/new timeout value, the author and the guild.
On Guild Ban Event
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.
On Guild Banner Event
Fired when a banner of a guild changes can be used to get the old/new banner, the author and the guild.
On Guild Boost Count Update
Fired when a boost count of a guild changes - can be used to get the old/new count, and the guild.
On Guild Boost Tier Update
Fired when a boost tier of a guild changes - can be used to get the old/new tier, and the guild.
On Guild Icon Event
Fired when the icon of a guild changes can be used to get the old/new icon, the author and the guild.
On Poll Vote Add
Fired when a user vote on a poll.
Requirements
- The
guild message polls
intent (to work in guilds) - The
direct message polls
intent (to work in DMs)
If none of these intents are enabled, the event will not be fired at all.
event-user
event-guild
event-bot
event-channel
(and subtypes)event-number
(represents the message's ID)
On Poll Vote Remove
Fired when a user remove their vote on a poll.
Requirements
- The
guild message polls
intent (to work in guilds) - The
direct message polls
intent (to work in DMs)
If none of these intents are enabled, the event will not be fired at all.
event-user
event-guild
event-bot
event-channel
(and subtypes)event-number
(represents the message's ID)
On Invite Create Event
Fired when a invite is created in a guild can be used to get the invite property, the author and the guild.
On Invite Delete Event
Fired when a invite is deleted from a guild can be used to get the invite property, the author and the guild.
On Guild Join Event
Fired when the bot joins in a guild.
On Guild Log Entry Create Event
Fired when a new log entry is created in a guild.
logged author
will always return none
for the logged entry of this event (as we only have its ID)
You can use the retrieve value author
to get the actual author of the entry. (only for DiSky v4.17.0+)
event-guild
event-bot
event-logentry
(Note:logged author
of the entry will always returnnone
)event-number
(represent the author ID of the logged entry)
author
(to get the actual author of the entry)
On Guild Name Event
Fired when the name of a guild is changed can be used to get the old/new name.
On Guild Owner Event
Fired when a owner of a guild changes can be used to get the old/new owner, the author and the guild.
On Guild Splash Event
Fired when a banner of a guild changes can be used to get the old/new banner, the author and the guild.
On Guild Unban Event
Fired when a user is unbanned can be used to get the unbanned user, the author and the guild.
On Button Click
Fired when any button sent by the button is clicked. Use 'event-button' to get the button id. Don't forget to either reply or defer the interaction. Modal can be shown in this interaction.
On Entity Dropdown Click
Fired when an user select one or more choice in an entity dropdown. Use 'event-dropdown' to get the dropdown id. Don't forget to either reply or defer the interaction. Use 'selected entities' to get the selected entities. Modal can be shown in this interaction.
On Message Command
Fired when someone click on a message application command. Use 'event-string' to get the command name. Don't forget to either reply to the interaction. Defer doesn't work here. Modal can be shown in this interaction.
On Modal Receive
Fired when a modal has been sent to the bot from any user. Use 'event-string' to get the modal id. Don't forget to either reply or defer the interaction. Modal can NOT be shown in this interaction.
On Slash Command
Fired when a user execute a specific slash command. Use 'event-string' 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]. Modal can be shown in this interaction. You can get value of arguments using 'argument "name" as string' for example.
On Slash Completion
Fired when Discord ask an argument completion. Use 'event-string' to get the command name. Use normal return effect to return the actual completions. Modal can NOT be shown in this interaction.
On String Dropdown Click
Fired when an user select one or more choice in a string dropdown. Use 'event-dropdown' to get the dropdown id. Don't forget to either reply or defer the interaction. Use 'selected values' to get the selected string values. Modal can be shown in this interaction.
On User Command
Fired when someone click on an user application command. Use 'event-string' to get the command name. Don't forget to either reply to the interaction. Defer doesn't work here. Modal can be shown in this interaction.
On Member Accept Screen Event
Fired when a member has agreed to membership screen requirements it can be useful for adding roles since the member is not available if they haven't accepted it yet.
On Member Avatar Event
Fired when a member changes their avatar.
On Member Boost Time Change Event
What happened to the member boost
event?
Discord only sends us the premium type
of a member, thus either he is boosting or not.
It's impossible to tell how long he has been boosting, nor how many times, so the member boost
event has been removed.
Fired when a member starts or stops boosting a guild.
This event requires the guild members
intents, and target members to be cached
On Member Join Event
Fired when a member joins a guild.
On Member Nickname Event
Fired when a member changes their nickname.
On Member Leave Event
Fired when a member is removed from a guild either by leaving or being punished. Use the ban/kick event instead to check the exact reason
On Role Add Event
Fired when a member adds roles to another member, it's a log action so event-author returns who made the action event-roles returns a list of added roles
On Role Remove Event
Fired when a member removes roles from another member, it's a log action so event-author returns who made the action event-roles returns a list of removed roles
On Member Voice Join Event
Fired when a member joins a voice or a stage channel, also fires when a member moves to another channel
On Member Voice Leave Event
Fired when a member leaves a voice or a stage channel
On Message Delete
Fired when any message is deleted. Use 'event-string' to get the old message content, only works if this message was cached by DiSky before hand. This will be fired, by default, both guild & private messages, use the 'event is from guild' condition to avoid confusion.
On Message Edit
Fired when any message is edited / updated. Use 'event-string' to get the old message content, only works if this message was cached by DiSky before hand. This will be fired, by default, both guild & private messages, use the 'event is from guild' condition to avoid confusion.
On Message Receive
Fired when any bot receive an actual message. This will be fired, by default, both guild & private messages, use the 'event is from guild' condition to avoid confusion.
On Reaction Add
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.
On Reaction Remove All
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.
On Reaction Remove
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.
On Role Color Change
Fired when the color of a role changes.
On Role Create
Fired when a role is created in a guild
On Role Delete
Fired when a role is deleted from a guild.
On Role Hoist Change
Fired when the hoist state of a role changes.
On Role Icon Change
Fired when the icon of a role changes.
On Role Name Change
Fired when the name of a role changes.
On Role Permission Change
Fired when the permissions of a role changes.
On Role Position Change
Fired when the position of a role changes.
On Thread Join Event
Fired when a member joins a tread, either by joining itself or by a moderator can be used to get the thread, the guild and the member.
On Thread Leave Event
Fired when a member leaves a thread, either by leaving itself or by a moderator can be used to get the thread, the guild and the member.
On User Activity Order Event
Fired when a user in a guild changes its activity. Ex: by playing something different can be used to get the old/new activities.
On User Avatar Event
Fired when a user changes its avatar.
On User Discriminator Event
Fired when a user changes its discriminator.
On User Name Event
Fired when a user changes its name (not nickname).
On User Online Status Event
Fired when a user changes its online status.
On User Typing Event
Fired when a user starts typing in a channel.
On Track Event
Fired when a track receive a specific event. Use the literal to define the event's type such as: - START - END - STUCK - PAUSE - RESUME - SEEK
On Channel Create Event
Fired when a channel is created.
On Channel Delete Event
Fired when a channel is deleted.