init.inc 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #include <discord>
  2. /* ====================================================================
  3. Discord colour definitions here only please
  4. =======================================================================*/
  5. #define DISCORD_COLOR_INFO 0x58aecb
  6. /* ====================================================================
  7. Channel definitions here only please
  8. =======================================================================*/
  9. #define DISCORD_ADMINCHAT_CHANNEL "465873855672745985"
  10. #define DISCORD_ADMINCMDS_CHANNEL "465875438321795074"
  11. #define DISCORD_NEWBIE_CHANNEL "465874164960460800"
  12. #define DISCORD_TESTER_CHANNEL "465874413267582986"
  13. #define DISCORD_BUG_CHANNEL "465879591656095754"
  14. //=====================================================================
  15. Hook:Discord_OnGameModeInit() {
  16. Discord:connect("127.0.0.1", 7778);
  17. return 1;
  18. }
  19. Hook:Discord_OnGameModeExit() {
  20. Discord:disconnect();
  21. return 1;
  22. }
  23. CMD:dconnect(playerid, params[]) {
  24. if(PlayerInfo[playerid][pDev] > 2) {
  25. SendClientMessage(playerid, -1, "You have requested the SA:MP server to reconnect to the Discord bot.");
  26. Discord:reconnect();
  27. }
  28. return 1;
  29. }
  30. /* ====================================================================
  31. Include any files containing message types e.g what should the
  32. server do when !admins is sent on Discord?
  33. =======================================================================*/
  34. #include "inc/discord/admin.inc"
  35. #include "inc/discord/developer.inc"
  36. #include "inc/discord/player.inc"
  37. //=====================================================================