mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-06 18:11:59 +00:00
Add intents to example
This commit is contained in:
parent
c0dfdf1bef
commit
ec9089cf0a
@ -40,9 +40,13 @@ as seen in the example above. The second is using the :func:`~ext.commands.comma
|
|||||||
|
|
||||||
Essentially, these two are equivalent: ::
|
Essentially, these two are equivalent: ::
|
||||||
|
|
||||||
|
import discord
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
|
|
||||||
bot = commands.Bot(command_prefix='$')
|
intents = discord.Intents.default()
|
||||||
|
intents.message_content = True
|
||||||
|
|
||||||
|
bot = commands.Bot(command_prefix='$', intents=intents)
|
||||||
|
|
||||||
@bot.command()
|
@bot.command()
|
||||||
async def test(ctx):
|
async def test(ctx):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user