Support privileged intents

This commit is contained in:
Ave 2020-10-01 22:05:40 +03:00
parent 4b0eae89b2
commit d905db5666
No known key found for this signature in database
GPG key ID: 398DD7BD03276F6D
3 changed files with 6 additions and 2 deletions

View file

@ -10,6 +10,7 @@ Code is based on https://gitlab.com/a/dpybotbase and https://github.com/916253/K
## How to run
- Copy `config.py.template` to `config.py`, configure all necessary parts to your server.
- Enable the `Server Members` privileged intent ([guide here](https://discordpy.readthedocs.io/en/latest/intents.html?highlight=intents#privileged-intents)) for the bot. You don't need to give Discord your passport as Robocop-NG is not designed to run at >1 guild at once, let alone >100.
- (obviously) Add the bot to your guild. Many resources about this online.
- If you haven't already done this already, **move the bot's role above the roles it'll need to manage, or else it won't function properly**, this is especially important for verification as it doesn't work otherwise.
- Install python3.6+.

View file

@ -226,4 +226,8 @@ for wanted_json in wanted_jsons:
with open(wanted_json, "w") as f:
f.write("{}")
bot.run(config.token, bot=True, reconnect=True)
intents = discord.Intents.default()
intents.typing = False
intents.members = True
bot.run(config.token, bot=True, reconnect=True, intents=intents)

View file

@ -230,7 +230,6 @@ class ModUserlog(Cog):
f"created_at = {user.created_at}\n"
f"display_name = {display_name}\n"
f"joined_at = {user.joined_at}\n"
f"activities = `{user.activities}`\n"
f"color = {user.colour}\n"
f"top_role = {role}\n",
embed=embed,