Skip to content

Commit 59b6ef4

Browse files
authored
Merge pull request #510 from SpeedLight-Dev/patch-1
Update button_roles.py
2 parents 3ce83f3 + 50096c9 commit 59b6ef4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

examples/views/button_roles.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
"""
1313

1414
# this is the list of role IDs that will be added as buttons.
15-
role_ids = [
16-
846383888003760217, 846383888036134932
17-
]
15+
role_ids = [...]
1816

1917

2018
class RoleButton(discord.ui.Button):
@@ -65,7 +63,7 @@ def __init__(self, bot):
6563
self.bot = bot
6664

6765
# make sure to set the guild ID here to whatever server you want the buttons in
68-
@slash_command(guild_ids=[846383887973482516], description="Post the button role message")
66+
@slash_command(guild_ids=[...], description="Post the button role message")
6967
async def post(self, ctx: commands.Context):
7068
"""Slash command to post a new view with a button for each role
7169
"""
@@ -91,7 +89,7 @@ async def on_ready(self):
9189
# we recreate the view as we did in the /post command
9290
view = discord.ui.View(timeout=None)
9391
# make sure to set the guild ID here to whatever server you want the buttons in
94-
guild = self.bot.get_guild(846383887973482516)
92+
guild = self.bot.get_guild(...)
9593
for role_id in role_ids:
9694
role = guild.get_role(role_id)
9795
view.add_item(RoleButton(role))

0 commit comments

Comments
 (0)