mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Add intents to examples
This commit is contained in:
1 parent
1518790c87
commit
4bce41f7aa
2 files changed
+13
-2
No files matched your search
@@ -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')
|
||||
Reference in new issue
Block a user