From ce564738c88c2f547d80fd858b94969dbaac993e Mon Sep 17 00:00:00 2001 From: Fallen_Breath Date: Sat, 10 Sep 2022 18:01:35 +0800 Subject: [PATCH] update discord.py now `discord.py>=2.0.0` is required, and message content intent in the discord application dashboard too --- README.md | 2 +- chatbridge/impl/discord/bot.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6e1f2a7..6c8ad13 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ Extra configure fields (compared to [CLI client](#cli-client)) Extra requirements (also listed in `/chatbridge/impl/discord/requirements.txt`): ``` -discord.py +discord.py>=2.0.0 ``` Extra configure fields (compared to [CLI client](#cli-client)) diff --git a/chatbridge/impl/discord/bot.py b/chatbridge/impl/discord/bot.py index 9f2102b..4071e99 100644 --- a/chatbridge/impl/discord/bot.py +++ b/chatbridge/impl/discord/bot.py @@ -151,7 +151,10 @@ def format_message_text(msg): def create_bot() -> DiscordBot: config = stored.config - bot = DiscordBot(config.command_prefix) + + intents = discord.Intents.default() + intents.message_content = True + bot = DiscordBot(config.command_prefix, intents=intents) # noinspection PyShadowingBuiltins @bot.command()