SA:MP plugin which controls a Discord bot
Adds command interaction natives. Pre release because it may break.
open.mp support added, if you're on an open.mp server please put the plugin in the components folder from now on. an edit to config.json will be required where this should be added (if you're not using enviromental variables):
"discord": {
"bot_token": "MYBOTTOKEN"
}
refer to the readme if you're stuck. . Environmental variable SAMP_DISCORD_BOT_TOKEN is now DEPRECATED use DCC_BOT_TOKEN
Added new configuration option to control intents:
SA:MP: discord_bot_intents 131071
open.mp:
"discord": {
"bot_token": "MYBOTTOKEN",
"intents": 131071
}
Changes:
New features:
DCC_CreateReaction DCC_DeleteMessageReaction
functionsDCC_OnMessageReaction
callbackDCC_EditMessage
functionDCC_SetMessagePersistent
functionDCC_CacheChannelMessage
functionDCC_(Create/Delete)Emoji
functionsDCC_GetEmojiName
functionThis update updates the discord api to v8.
Bug fixes:
New features:
Bug fixes:
DCC_GetChannelParentCategory
) and setting/getting a user's voice channel (DCC_[Set/Get]GuildMemberVoiceChannel
)DCC_OnGuildMemberVoiceUpdate
)Thanks to @kubkodev for providing the new functions and callbacks! (#106)
Breaking changes:
DCC_ID_SIZE
is the size constant:new id[DCC_ID_SIZE];
DCC_GetChannelId(channel, id); // will throw a compile error if `id` is not exactly `DCC_ID_SIZE` large
DCC_GetUserEmail
has been removed with no replacement; fetching a user's email is not supported by the Discord bot APIDCC_OnChannelMessage
has been removed; use DCC_OnMessageCreate
as a replacement
Bug fixes:
New features:
SAMP_DISCORD_BOT_TOKEN
(optional)DCC_SendChannelMessage
and other "create"-type functionsDCC_OnMessageCreate
and DCC_OnMessageDelete
DCC_EscapeMarkdown
)DCC_FindRoleByName
functionDCC_GetGuildMemberStatus
native and spammed the log file with messages like can't update guild member presence: guild id "online" not cached
)NOTE The CentOS build might contain bugs and crashes not present in other builds. This is due to a compiler bug GCC 4.8 ships with. Support for CentOS will be removed starting with the next major or minor update.