Skip to content

Commit 8da4f25

Browse files
authored
docs: clarify intents in example (#1516)
1 parent 2184b71 commit 8da4f25

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/src/Guides/90 Example.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ logging.basicConfig()
1515
cls_log = logging.getLogger("MyLogger")
1616
cls_log.setLevel(logging.DEBUG)
1717

18-
bot = Client(intents=Intents.DEFAULT, sync_interactions=True, asyncio_debug=True, logger=cls_log)
18+
bot = Client(
19+
intents=Intents.DEFAULT | Intents.MESSAGE_CONTENT,
20+
sync_interactions=True,
21+
asyncio_debug=True,
22+
logger=cls_log
23+
)
1924
prefixed_commands.setup(bot)
2025

2126

@@ -30,6 +35,8 @@ async def on_guild_create(event):
3035
print(f"guild created : {event.guild.name}")
3136

3237

38+
# Message content is a privileged intent.
39+
# Ensure you have message content enabled in the Developer Portal for this to work.
3340
@listen()
3441
async def on_message_create(event):
3542
print(f"message received: {event.message.content}")

0 commit comments

Comments
 (0)