fix: Add missing permission wards.

This commit is contained in:
2023-08-16 23:25:12 +03:00
parent 41c0f2d094
commit fde42226ed
5 changed files with 11 additions and 5 deletions

View File

@@ -511,6 +511,7 @@ class Economy(LionCog):
"Target user or role to view or update. Use @everyone to reset the entire guild."
),
)
@low_management_ward
async def economy_reset_cmd(
self,
ctx: LionContext,
@@ -634,7 +635,7 @@ class Economy(LionCog):
# Do not create the member row if it does not already exist.
# TODO: Audit logging trail
await ctx.bot.core.data.Member.table.update_where(
guuildid=ctx.guild.id,
guildid=ctx.guild.id,
userid=target.id,
).set(coins=starting_balance)
await ctx.reply(

View File

@@ -4,8 +4,9 @@ The dashboard shows a summary of the various registered global bot settings.
import discord
import discord.ext.commands as cmds
import discord.app_commands as appcmd
from meta import LionBot, LionCog, LionContext
from meta import LionBot, LionCog, LionContext, conf
from meta.app import appname
from wards import sys_admin_ward
@@ -15,6 +16,8 @@ from settings.groups import SettingGroup
class LeoSettings(LionCog):
depends = {'CoreCog'}
admin_guilds = conf.bog.getintlist('admin_guilds')
def __init__(self, bot: LionBot):
self.bot = bot
@@ -23,6 +26,7 @@ class LeoSettings(LionCog):
@cmds.hybrid_group(
name="leo"
)
@appcmd.guilds(*admin_guilds)
@sys_admin_ward
async def leo_group(self, ctx: LionContext):
"""

View File

@@ -376,12 +376,12 @@ class PresenceCtrl(LionCog):
name="presence",
description="Globally set the bot status and activity."
)
@sys_admin_ward
@appcmds.describe(
status="Online status (online | idle | dnd | offline)",
type="Activity type (watching | listening | playing | streaming)",
string="Activity name, supports substitutions $in_vc, $voice_channels, $shard_guilds, $shard_members"
)
@sys_admin_ward
async def presence_cmd(
self,
ctx: LionContext,