From 8da4f25cf22ad26f72a0f18fb6a5e7905c9215a2 Mon Sep 17 00:00:00 2001 From: Sophia <41456914+i0bs@users.noreply.github.com> Date: Mon, 7 Aug 2023 01:33:16 -0400 Subject: [PATCH] docs: clarify intents in example (#1516) --- docs/src/Guides/90 Example.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/src/Guides/90 Example.md b/docs/src/Guides/90 Example.md index fc57a14a0..70690371f 100644 --- a/docs/src/Guides/90 Example.md +++ b/docs/src/Guides/90 Example.md @@ -15,7 +15,12 @@ logging.basicConfig() cls_log = logging.getLogger("MyLogger") cls_log.setLevel(logging.DEBUG) -bot = Client(intents=Intents.DEFAULT, sync_interactions=True, asyncio_debug=True, logger=cls_log) +bot = Client( + intents=Intents.DEFAULT | Intents.MESSAGE_CONTENT, + sync_interactions=True, + asyncio_debug=True, + logger=cls_log +) prefixed_commands.setup(bot) @@ -30,6 +35,8 @@ async def on_guild_create(event): print(f"guild created : {event.guild.name}") +# Message content is a privileged intent. +# Ensure you have message content enabled in the Developer Portal for this to work. @listen() async def on_message_create(event): print(f"message received: {event.message.content}")