mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-22 16:32:59 +00:00
Add intents to examples
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# This example requires the 'members' privileged intents
|
||||
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
import random
|
||||
@@ -6,7 +8,11 @@ description = '''An example bot to showcase the discord.ext.commands extension
|
||||
module.
|
||||
|
||||
There are a number of utility commands being showcased here.'''
|
||||
bot = commands.Bot(command_prefix='?', description=description)
|
||||
|
||||
intents = discord.Intents.default()
|
||||
intents.members = True
|
||||
|
||||
bot = commands.Bot(command_prefix='?', description=description, intents=intents)
|
||||
|
||||
@bot.event
|
||||
async def on_ready():
|
||||
|
Reference in New Issue
Block a user