mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 02:08:25 +00:00
Run black on all examples and require it for CI
This commit is contained in:
@ -2,15 +2,16 @@
|
||||
|
||||
import discord
|
||||
|
||||
|
||||
class MyClient(discord.Client):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.role_message_id = 0 # ID of the message that can be reacted to to add/remove a role.
|
||||
self.role_message_id = 0 # ID of the message that can be reacted to to add/remove a role.
|
||||
self.emoji_to_role = {
|
||||
discord.PartialEmoji(name='🔴'): 0, # ID of the role associated with unicode emoji '🔴'.
|
||||
discord.PartialEmoji(name='🟡'): 0, # ID of the role associated with unicode emoji '🟡'.
|
||||
discord.PartialEmoji(name='green', id=0): 0, # ID of the role associated with a partial emoji's ID.
|
||||
discord.PartialEmoji(name='🔴'): 0, # ID of the role associated with unicode emoji '🔴'.
|
||||
discord.PartialEmoji(name='🟡'): 0, # ID of the role associated with unicode emoji '🟡'.
|
||||
discord.PartialEmoji(name='green', id=0): 0, # ID of the role associated with a partial emoji's ID.
|
||||
}
|
||||
|
||||
async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent):
|
||||
@ -78,6 +79,7 @@ class MyClient(discord.Client):
|
||||
# If we want to do something in case of errors we'd do it here.
|
||||
pass
|
||||
|
||||
|
||||
intents = discord.Intents.default()
|
||||
intents.members = True
|
||||
|
||||
|
Reference in New Issue
Block a user