Advertisement
Tritonio

Discordia intent for DMs only

Jun 19th, 2020
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Making Discordia bots receive only DM related events and no text channel events or any other useless event. Useful for DM only Lua Discord bots on Discordia.
  2.  
  3. Edit Shard.lua in Discordia and add these two lines:
  4.  
  5. guild_subscriptions = false,
  6. intents = 2^12+2^13,
  7.  
  8. Like this:
  9.  
  10. return self:_send(IDENTIFY, {
  11. token = client._token,
  12. properties = {
  13. ['$os'] = jit.os,
  14. ['$browser'] = 'Discordia',
  15. ['$device'] = 'Discordia',
  16. ['$referrer'] = '',
  17. ['$referring_domain'] = '',
  18. },
  19. compress = options.compress,
  20. guild_subscriptions = false,
  21. intents = 2^12+2^13,
  22. large_threshold = options.largeThreshold,
  23. shard = {self._id, client._total_shard_count},
  24. presence = next(client._presence) and client._presence,
  25. }, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement