discord-connector.inc 954 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* Discord Connector
  2. * Version 0.1
  3. * made by maddinat0r
  4. */
  5. #if defined dcconnector_included
  6. #endinput
  7. #endif
  8. #define dcconnector_included
  9. #if !defined E_LOGLEVEL
  10. enum E_LOGLEVEL
  11. {
  12. NONE = 0,
  13. DEBUG = 1,
  14. INFO = 2,
  15. WARNING = 4,
  16. ERROR = 8,
  17. ALL = ERROR | WARNING | INFO | DEBUG
  18. };
  19. #endif
  20. // natives
  21. native DCC_Connect(const bot_token[]);
  22. native DCC_Channel:DCC_FindChannelByName(const channel_name[]);
  23. native DCC_Channel:DCC_FindChannelById(const channel_id[]);
  24. native DCC_IsChannelPrivate(DCC_Channel:channel, &bool:is_private);
  25. native DCC_GetChannelName(DCC_Channel:channel, dest[], max_size = sizeof dest);
  26. native DCC_GetChannelId(DCC_Channel:channel, dest[], max_size = sizeof dest);
  27. native DCC_GetChannelTopic(DCC_Channel:channel, dest[], max_size = sizeof dest);
  28. native DCC_SendChannelMessage(DCC_Channel:channel, const message[]);
  29. // callbacks
  30. forward DCC_OnChannelMessage(DCC_Channel:channel, const author[], const message[]);