Update
This commit is contained in:
parent
49105886ec
commit
9a522aa71d
2 changed files with 4 additions and 1 deletions
|
@ -63,6 +63,7 @@ class gameutils(commands.Cog):
|
|||
name="turngen",
|
||||
description="Roll the next turn for a certian role",
|
||||
guild_ids=[699285282276507708],
|
||||
default_member_permissions=nextcord.Permissions(manage_roles=True),
|
||||
)
|
||||
@nextcord.ext.application_checks.has_permissions(manage_roles=True)
|
||||
async def turngen(self, interaction: nextcord.Interaction, role: nextcord.Role):
|
||||
|
|
|
@ -13,6 +13,7 @@ class RoleView(nextcord.ui.View):
|
|||
super().__init__(timeout=None)
|
||||
self.bot = bot
|
||||
for b in buttonlist:
|
||||
b.callback = self.buttoncallback
|
||||
self.add_item(b)
|
||||
#res = await self.bot.cur.execute(f"SELECT roleid FROM rolebutton WHERE serverid = {self.bot.roleguild.id}")
|
||||
button = nextcord.ui.Button(label="Test", style=nextcord.ButtonStyle.gray, custom_id="rolebutton:821095192831852554")
|
||||
|
@ -51,6 +52,7 @@ class rolebutton(commands.Cog):
|
|||
@nextcord.slash_command(
|
||||
name="rolebuttons",
|
||||
description="modify role buttons",
|
||||
default_member_permissions=nextcord.Permissions(manage_roles=True),
|
||||
)
|
||||
async def rolebuttons(self, interaction: nextcord.Interaction):
|
||||
return
|
||||
|
@ -59,6 +61,7 @@ class rolebutton(commands.Cog):
|
|||
|
||||
@nextcord.message_command(
|
||||
name="refresh role buttons",
|
||||
default_member_permissions=nextcord.Permissions(manage_roles=True),
|
||||
)
|
||||
@nextcord.ext.application_checks.has_permissions(manage_roles=True)
|
||||
async def rolerefresh(self, interaction: nextcord.Interaction, message: nextcord.Message):
|
||||
|
@ -70,7 +73,6 @@ class rolebutton(commands.Cog):
|
|||
buttonlist.clear()
|
||||
for r in res:
|
||||
button = nextcord.ui.Button(label="r", style=nextcord.ButtonStyle.gray, custom_id=f"rolebutton:{r}")
|
||||
button.callback = RoleView.buttoncallback
|
||||
buttonlist.append(button)
|
||||
await message.edit(view=RoleView(self.bot))
|
||||
await interaction.response.send_message("Edited!", ephemeral=True)
|
||||
|
|
Loading…
Reference in a new issue