fix: Add missing permission wards.
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user