Am dumb, deleted too much
This commit is contained in:
parent
a1f51f3788
commit
d20604d00f
@ -77,6 +77,21 @@ class ReginaldCog(commands.Cog):
|
|||||||
]
|
]
|
||||||
return random.choice(fallback_responses)
|
return random.choice(fallback_responses)
|
||||||
|
|
||||||
|
@commands.command(name="reginald_allowrole", help="Allow a role to use the Reginald command")
|
||||||
|
@commands.has_permissions(administrator=True)
|
||||||
|
async def allow_role(self, ctx, role: discord.Role):
|
||||||
|
"""Allows a role to use the Reginald command (stores by ID instead of name)"""
|
||||||
|
await self.config.guild(ctx.guild).allowed_role.set(role.id)
|
||||||
|
await ctx.send(f"The role `{role.name}` (ID: `{role.id}`) is now allowed to use the Reginald command.")
|
||||||
|
|
||||||
|
@commands.command(name="reginald_disallowrole", help="Remove a role's ability to use the Reginald command")
|
||||||
|
@commands.has_permissions(administrator=True)
|
||||||
|
async def disallow_role(self, ctx):
|
||||||
|
"""Revokes a role's permission to use the Reginald command"""
|
||||||
|
await self.config.guild(ctx.guild).allowed_role.clear()
|
||||||
|
await ctx.send("The role's permission to use the Reginald command has been revoked.")
|
||||||
|
|
||||||
|
|
||||||
@reginald.error
|
@reginald.error
|
||||||
async def reginald_error(self, ctx, error):
|
async def reginald_error(self, ctx, error):
|
||||||
if isinstance(error, commands.BadArgument):
|
if isinstance(error, commands.BadArgument):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user