aboutsummaryrefslogtreecommitdiff
path: root/examples/new_member.py
diff options
context:
space:
mode:
authorZomatree <[email protected]>2020-10-01 09:42:08 +0100
committerGitHub <[email protected]>2020-10-01 04:42:08 -0400
commit4bce41f7aaa59196ec00b9754ef731f35d686bdb (patch)
treeaa5a5f717f159674bf221404cc9fa9bf392bfbfe /examples/new_member.py
parentSome minor documentation fixes. (diff)
downloaddiscord.py-4bce41f7aaa59196ec00b9754ef731f35d686bdb.tar.xz
discord.py-4bce41f7aaa59196ec00b9754ef731f35d686bdb.zip
Add intents to examples
Diffstat (limited to 'examples/new_member.py')
-rw-r--r--examples/new_member.py7
1 files changed, 6 insertions, 1 deletions
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')