mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-06-02 10:34:54 +12:00
Fix ability to load and resolve last comment on perms for commands.
This commit is contained in:
parent
85a9093be9
commit
43740dc9fc
|
@ -1,7 +1,7 @@
|
||||||
from .trotters import Trotters
|
from .roletracker import RoleTracker
|
||||||
|
|
||||||
|
|
||||||
async def setup(bot):
|
async def setup(bot):
|
||||||
trotters = Trotters(bot)
|
roletracker = RoleTracker(bot)
|
||||||
await trotters.initialize()
|
await roletracker.initialize()
|
||||||
bot.add_cog(trotters)
|
bot.add_cog(roletracker)
|
||||||
|
|
|
@ -52,11 +52,11 @@ class RoleTracker(commands.Cog):
|
||||||
# Commands
|
# Commands
|
||||||
@commands.group()
|
@commands.group()
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
|
@checks.mod_or_permissions(manage_roles=True)
|
||||||
async def roletracker(self, ctx: GuildContext):
|
async def roletracker(self, ctx: GuildContext):
|
||||||
"""Role Trackers settings"""
|
"""Role Trackers settings"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@checks.admin_or_permissions(manage_roles=True)
|
|
||||||
@roletracker.command(name="set")
|
@roletracker.command(name="set")
|
||||||
async def set_role(self, ctx: GuildContext, role: discord.Role, enabled: bool):
|
async def set_role(self, ctx: GuildContext, role: discord.Role, enabled: bool):
|
||||||
"""
|
"""
|
||||||
|
@ -78,7 +78,6 @@ class RoleTracker(commands.Cog):
|
||||||
await self.config.role(role).addable.set(True)
|
await self.config.role(role).addable.set(True)
|
||||||
await ctx.tick()
|
await ctx.tick()
|
||||||
|
|
||||||
@checks.admin_or_permissions(manage_roles=True)
|
|
||||||
@roletracker.command(name="roles")
|
@roletracker.command(name="roles")
|
||||||
async def view_roles(self, ctx: GuildContext):
|
async def view_roles(self, ctx: GuildContext):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue