mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 02:08:25 +00:00
Add message content intent to examples
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
# This example requires the 'message_content' privileged intent to function.
|
||||
|
||||
import asyncio
|
||||
|
||||
import discord
|
||||
@ -123,8 +125,12 @@ class Music(commands.Cog):
|
||||
elif ctx.voice_client.is_playing():
|
||||
ctx.voice_client.stop()
|
||||
|
||||
intents = discord.Intents.default()
|
||||
intents.message_content = True
|
||||
|
||||
bot = commands.Bot(command_prefix=commands.when_mentioned_or("!"),
|
||||
description='Relatively simple music bot example')
|
||||
description='Relatively simple music bot example',
|
||||
intents=intents)
|
||||
|
||||
@bot.event
|
||||
async def on_ready():
|
||||
|
Reference in New Issue
Block a user