From d905db5666aa641034e09c91256ca8450d3d9b23 Mon Sep 17 00:00:00 2001 From: Ave Date: Thu, 1 Oct 2020 22:05:40 +0300 Subject: [PATCH] Support privileged intents --- README.md | 1 + Robocop.py | 6 +++++- cogs/mod_userlog.py | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a27d811..f998900 100755 --- a/README.md +++ b/README.md @@ -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+. diff --git a/Robocop.py b/Robocop.py index 3001e5d..a21972d 100755 --- a/Robocop.py +++ b/Robocop.py @@ -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) diff --git a/cogs/mod_userlog.py b/cogs/mod_userlog.py index 9626929..88e03b0 100644 --- a/cogs/mod_userlog.py +++ b/cogs/mod_userlog.py @@ -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,