aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/basic_bot.py8
-rw-r--r--examples/new_member.py7
2 files changed, 13 insertions, 2 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():
diff --git a/examples/new_member.py b/examples/new_member.py
index 31a953bb..aa67c46e 100644
--- a/examples/new_member.py
+++ b/examples/new_member.py
@@ -1,3 +1,5 @@
+# This example requires the 'members' privileged intents
+
import discord
class MyClient(discord.Client):
@@ -14,5 +16,8 @@ class MyClient(discord.Client):
await guild.system_channel.send(to_send)
-client = MyClient()
+intents = discord.Intents.default()
+intents.members = True
+
+client = MyClient(intents=intents)
client.run('token')