commit
218d77d9f4
@ -5,9 +5,13 @@
|
||||
* Purpose: commands that can be used on the discord channel
|
||||
*/
|
||||
|
||||
/* ** Error Checking ** */
|
||||
#if defined DISCORD_DISABLED
|
||||
#endinput
|
||||
#endif
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
#include < discord-command >
|
||||
|
||||
/* ** Commands ** */
|
||||
DISCORD:commands( DCC_Channel: channel, DCC_User: author, params[ ] )
|
||||
|
@ -5,11 +5,24 @@
|
||||
* Purpose: discord implementation in-game
|
||||
*/
|
||||
|
||||
/* ** Enable or disable discord ** */
|
||||
// #define DISCORD_DISABLED // !!!! DISABLED BY DEFAULT !!!!
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
#include < discord-connector >
|
||||
#tryinclude < discord-connector >
|
||||
#tryinclude < discord-command >
|
||||
|
||||
/* ** Disable if discord connector not enabled ** */
|
||||
#if !defined dcconnector_included && !defined DISCORD_DISABLED
|
||||
#warning "Discord is disabled as the connector is not found. (https://github.com/maddinat0r/samp-discord-connector)"
|
||||
#define DISCORD_DISABLED
|
||||
#endif
|
||||
|
||||
#if !defined _discordcmd_included && !defined DISCORD_DISABLED
|
||||
#warning "Discord is disabled as the command handler is not found. (https://github.com/AliLogic/discord-command)"
|
||||
#define DISCORD_DISABLED
|
||||
#endif
|
||||
|
||||
/* ** Definitions ** */
|
||||
/* Guild */
|
||||
@ -56,23 +69,33 @@ new stock
|
||||
DCC_Role: discordRoleMember
|
||||
;
|
||||
|
||||
stock DCC_SendChannelMessageFormatted( DCC_Channel: channel, const format[ ], va_args< > ) {
|
||||
return DCC_SendChannelMessage( channel, va_return( format, va_start< 2 > ) );
|
||||
}
|
||||
|
||||
/* ** Error Checking ** */
|
||||
#if defined DISCORD_DISABLED
|
||||
stock DCC_SendChannelMessage( DCC_Channel: channel, const message[ ] ) {
|
||||
stock TMP_DCC_SendChannelMessage( DCC_Channel: channel, const message[ ] ) {
|
||||
#pragma unused channel
|
||||
#pragma unused message
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined _ALS_DCC_SendChannelMessage
|
||||
#undef DCC_SendChannelMessage
|
||||
#else
|
||||
#define _ALS_DCC_SendChannelMessage
|
||||
#endif
|
||||
#define DCC_SendChannelMessage TMP_DCC_SendChannelMessage
|
||||
|
||||
stock DCC_SendUserMessage( DCC_User: author, const message[ ] )
|
||||
{
|
||||
#pragma unused author
|
||||
#pragma unused message
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock DCC_SendChannelMessageFormatted( DCC_Channel: channel, const format[ ], va_args< > ) {
|
||||
#pragma unused channel
|
||||
#pragma unused format
|
||||
return 1;
|
||||
}
|
||||
#endinput
|
||||
#endif
|
||||
|
||||
@ -167,3 +190,7 @@ public DCC_OnGuildMemberAdd(DCC_Guild:guild, DCC_User:user)
|
||||
DCC_SendUserUsage(user, "Hey there! I am **Stephanie**, i am here to help you out!\nUse **!commands** to see all commands i offer.\nYou need to have **member** role trough to use them, so first verify your account!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock DCC_SendChannelMessageFormatted( DCC_Channel: channel, const format[ ], va_args< > ) {
|
||||
return DCC_SendChannelMessage( channel, va_return( format, va_start< 2 > ) );
|
||||
}
|
Loading…
Reference in New Issue
Block a user