Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
DoroWolf committed Dec 19, 2023
1 parent 29674d4 commit 307940c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions modules/core/alias.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from core.builtins import Bot, Image, command_prefix
from core.builtins import Bot, Image
from core.component import module
from core.utils.image_table import image_table_render, ImageTable

Expand All @@ -25,7 +25,7 @@ async def set_alias(msg: Bot.MessageSession):
break
if not has_prefix:
await msg.finish(msg.locale.t("core.message.alias.add.invalid_prefix"))
command = command_prefix[0] + command[1:]
command = msg.prefixes[0] + command[1:]
aliases[alias] = command
msg.data.edit_option('command_alias', aliases)
await msg.finish(msg.locale.t("core.message.alias.add.success", alias=alias, command=command))
Expand Down
2 changes: 1 addition & 1 deletion modules/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async def config_ban(msg: Bot.MessageSession):
async def _(msg: Bot.MessageSession):
avaliable_lang = msg.locale.t("message.delimiter").join(get_available_locales())
await msg.finish(
f"{msg.locale.t('core.message.locale')}{msg.locale.t('language')}\n{msg.locale.t('core.message.locale.set.prompt', langlist=avaliable_lang, prefix=command_prefix[0])}")
f"{msg.locale.t('core.message.locale')}{msg.locale.t('language')}\n{msg.locale.t('core.message.locale.set.prompt', langlist=avaliable_lang, prefix=msg.prefixes[0])}")


@locale.command('<lang> {{core.help.locale.set}}', required_admin=True)
Expand Down
4 changes: 2 additions & 2 deletions modules/maimai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import traceback

from config import Config
from core.builtins import Bot, command_prefix, Plain, Image as BImage
from core.builtins import Bot, Plain, Image as BImage
from core.scheduler import CronTrigger
from core.utils.image import msgchain2image
from modules.maimai.libraries.maimai_best_50 import generate
Expand Down Expand Up @@ -454,7 +454,7 @@ async def _(msg: Bot.MessageSession, diff: str, sid: str, score: float):
b2t_2000_great=b2t_2000_great,
b2t_2000_great_prop=b2t_2000_great_prop)}''')
except ValueError:
await msg.finish(msg.locale.t('maimai.message.scoreline.error', prefix=command_prefix[0]))
await msg.finish(msg.locale.t('maimai.message.scoreline.error', prefix=msg.prefixes[0]))


@mai.command('rating <base> <score> {{maimai.help.rating}}')
Expand Down

0 comments on commit 307940c

Please sign in to comment.