imayushsaini / Bombsquad-Ballistica-Modded-Server

Modded Server scripts for game BombSquad
MIT License
51 stars 47 forks source link

Fix discord intents #75

Open imayushsaini opened 1 year ago

imayushsaini commented 1 year ago

https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server/blob/af7fb5a586e487fc589381caca3e1bf7bcb92bf4/dist/ba_root/mods/features/discord_bot.py#L15

This code asks for all discord intents which is actually not required. Only chat read write is enough. Discord started rejecting login requests if intents were not enabled on the developer portal.

ghost commented 1 year ago

This is not really an issues as some people don't want to keep writing:

intents = discord.Intents.all()
intents.message_content = True
intents.members = True
intents.guilds = True

it's just not fun. it is way easier just to do:

intents = discord.Intents.all()

and call it good