Archived
1
0
Fork 0

fix setup

This commit is contained in:
多羅狼 2024-01-31 14:04:10 +08:00 committed by GitHub
parent 95205c023c
commit 0500d05839
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -88,7 +88,7 @@ async def get_target(target_id: str):
'commandPrefix': command_prefix, 'commandPrefix': command_prefix,
'ban': ban, 'ban': ban,
'typoCheck': typo_check, 'typoCheck': typo_check,
'diceDcReversed': dice_dc_reversed, 'diceDCReversed': dice_dc_reversed,
'wiki': { 'wiki': {
'fandomAddon': wiki_fandom_addon, 'fandomAddon': wiki_fandom_addon,
'headers': wiki_headers, 'headers': wiki_headers,

View file

@ -165,7 +165,7 @@ async def _(msg: Bot.MessageSession):
msg.locale.t('core.message.whoami', senderid=msg.target.sender_id, targetid=msg.target.target_id) + perm) msg.locale.t('core.message.whoami', senderid=msg.target.sender_id, targetid=msg.target.target_id) + perm)
setup = module('setup', base=True, required_admin=True, desc='{core.help.setup.desc}', alias='toggle') setup = module('setup', base=True, desc='{core.help.setup.desc}', alias='toggle')
@setup.command('typing {{core.help.setup.typing}}') @setup.command('typing {{core.help.setup.typing}}')
@ -180,7 +180,7 @@ async def _(msg: Bot.MessageSession):
await msg.finish(msg.locale.t('core.message.setup.typing.enable')) await msg.finish(msg.locale.t('core.message.setup.typing.enable'))
''' '''
@setup.command('check {{core.help.setup.check}}') @setup.command('check {{core.help.setup.check}}', required_admin=True)
async def _(msg: Bot.MessageSession): async def _(msg: Bot.MessageSession):
state = msg.options.get('typo_check') state = msg.options.get('typo_check')
if state: if state:
@ -191,7 +191,7 @@ async def _(msg: Bot.MessageSession):
await msg.finish(msg.locale.t('core.message.setup.check.disable')) await msg.finish(msg.locale.t('core.message.setup.check.disable'))
''' '''
@setup.command('timeoffset <offset> {{core.help.setup.timeoffset}}') @setup.command('timeoffset <offset> {{core.help.setup.timeoffset}}', required_admin=True)
async def _(msg: Bot.MessageSession, offset: str): async def _(msg: Bot.MessageSession, offset: str):
try: try:
tstr_split = [int(part) for part in offset.split(':')] tstr_split = [int(part) for part in offset.split(':')]