diff options
| author | Zomatree <[email protected]> | 2020-10-01 09:42:08 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-01 04:42:08 -0400 |
| commit | 4bce41f7aaa59196ec00b9754ef731f35d686bdb (patch) | |
| tree | aa5a5f717f159674bf221404cc9fa9bf392bfbfe /examples/basic_bot.py | |
| parent | Some minor documentation fixes. (diff) | |
| download | discord.py-4bce41f7aaa59196ec00b9754ef731f35d686bdb.tar.xz discord.py-4bce41f7aaa59196ec00b9754ef731f35d686bdb.zip | |
Add intents to examples
Diffstat (limited to 'examples/basic_bot.py')
| -rw-r--r-- | examples/basic_bot.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/basic_bot.py b/examples/basic_bot.py index 88909f44..409d4c4a 100644 --- a/examples/basic_bot.py +++ b/examples/basic_bot.py @@ -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(): |