Add userlog setting, change permissions for modlog to admin only
This commit is contained in:
parent
e3273ea081
commit
ec99d0fb87
1 changed files with 23 additions and 2 deletions
|
@ -58,12 +58,33 @@ class SettingsCog(commands.Cog):
|
|||
)
|
||||
],
|
||||
)
|
||||
@admin_or_permissions(mute_members=True)
|
||||
@commands.has_permissions(administrator=True)
|
||||
async def _modlog(self, ctx, channel: TextChannel):
|
||||
await ctx.defer()
|
||||
self.update_settings("modlog", channel.id, ctx.guild.id)
|
||||
await ctx.send(
|
||||
f"Settings applied. New modlog channel is `{channel.name}`"
|
||||
f"Settings applied. New modlog channel is {channel.mention}"
|
||||
)
|
||||
|
||||
@cog_ext.cog_subcommand(
|
||||
base="settings",
|
||||
name="userlog",
|
||||
description="Set userlog channel",
|
||||
options=[
|
||||
create_option(
|
||||
name="channel",
|
||||
description="Userlog channel",
|
||||
option_type=7,
|
||||
required=True,
|
||||
)
|
||||
],
|
||||
)
|
||||
@commands.has_permissions(administrator=True)
|
||||
async def _modlog(self, ctx, channel: TextChannel):
|
||||
await ctx.defer()
|
||||
self.update_settings("userlog", channel.id, ctx.guild.id)
|
||||
await ctx.send(
|
||||
f"Settings applied. New userlog channel is {channel.mention}"
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue