Support privileged intents
This commit is contained in:
parent
4b0eae89b2
commit
d905db5666
3 changed files with 6 additions and 2 deletions
|
@ -10,6 +10,7 @@ Code is based on https://gitlab.com/a/dpybotbase and https://github.com/916253/K
|
||||||
## How to run
|
## How to run
|
||||||
|
|
||||||
- Copy `config.py.template` to `config.py`, configure all necessary parts to your server.
|
- 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.
|
- (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.
|
- 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+.
|
- Install python3.6+.
|
||||||
|
|
|
@ -226,4 +226,8 @@ for wanted_json in wanted_jsons:
|
||||||
with open(wanted_json, "w") as f:
|
with open(wanted_json, "w") as f:
|
||||||
f.write("{}")
|
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)
|
||||||
|
|
|
@ -230,7 +230,6 @@ class ModUserlog(Cog):
|
||||||
f"created_at = {user.created_at}\n"
|
f"created_at = {user.created_at}\n"
|
||||||
f"display_name = {display_name}\n"
|
f"display_name = {display_name}\n"
|
||||||
f"joined_at = {user.joined_at}\n"
|
f"joined_at = {user.joined_at}\n"
|
||||||
f"activities = `{user.activities}`\n"
|
|
||||||
f"color = {user.colour}\n"
|
f"color = {user.colour}\n"
|
||||||
f"top_role = {role}\n",
|
f"top_role = {role}\n",
|
||||||
embed=embed,
|
embed=embed,
|
||||||
|
|
Loading…
Reference in a new issue