-
Notifications
You must be signed in to change notification settings - Fork 0
Callbacks
lp_ edited this page Aug 5, 2022
·
21 revisions
-
OnInit
()
- This is considered as the main entry point for the main script. The main.amx is called first with its main() entry point, aswell as the OnInit callback.
-
OnFilterscriptInit
()
- This callback will be called for every filterscript, meaning additional scripts. This is for all scripts, but not the main.amx. (see above)
-
OnUnload
()
-
OnHeartbeat
(ping)
-
OnConsoleInput
(input[])
-
OnMemberJoin
(guildid, memberid)
-
OnMemberLeave
(guildid, memberid)
-
OnChannelMessage
(guildid, channelid[], memberid, content[])
-
OnChannelMessageDeleted
(guildid, channelid[], messageid[])
-
OnChannelMessageUpdated
(guildid, channelid[], memberid, messageid[], old_text[], new_text[])
-
OnReactionAdded
(guildid, emojiid[], messageid[], memberid, channelid[])
-
OnReactionRemoved
(guildid, emojiid[], messageid[], memberid, channelid[])
-
OnPrivateReactionAdded
(emojiid[], messageid[], memberid[], channelid[])
-
OnPrivateReactionRemoved
(emojiid[], messageid[], memberid[], channelid[])
-
OnPrivateMessage
(channel[], memberid[], messageid[], msg[])
-
OnPrivateMessageDeleted
(channelid[], memberid[], message[])
-
OnPrivateMessageUpdated
(userid[], messageid[], old_text[], new_text[])
-
OnGuildAdded
(guildid, guildid_long[])
- The original Discord (16-18 digit long ID) is passed as guildid_long. The guildid integer is the script-side ID.
-
OnGuildRemoved
(guildid, guildid_long[])
-
OnThreadMessage
(guildid, channelid[], threadid[], memberid, messageid[], content[])
-
OnThreadMessageDeleted
(guildid, channelid[], messageid[])
-
OnThreadMessageUpdated
(guildid, channelid[], threadid[], memberid[], messageid[], old_text[], new_text[])
-
OnThreadMessageReactionAdded
(guildid, emojiid[], messageid[], memberid, channelid[], threadid[])
-
OnThreadMessageReactionRemoved
(guildid, emojiid[], messageid[], memberid, channelid[], threadid[])
Most of the IDs from Discord Entities are used and passed as strings inside the pawn scripts, in their whole original 16-18 digit fashion.
EXCEPT: guild's and members
They are handled as integers for simplicity's sake. Also, for all private DM actions memberid will be passed as their original, 17-18 digit ID-string