fix: 系统语言为非中文时不显示命令列表的问题

This commit is contained in:
clansty 2022-08-14 12:47:49 +08:00
parent 3ca022088d
commit 420d749b7f
2 changed files with 4 additions and 2 deletions

View File

@ -142,7 +142,7 @@ export default class Telegram {
return await this.client.invoke(
new Api.bots.SetBotCommands({
commands,
langCode: 'zh',
langCode: '',
scope,
}),
);

View File

@ -127,7 +127,9 @@ export default class Instance {
this.log.info('OICQ 登录完成');
}
this.forwardPairs = await ForwardPairs.load(this.id, this.oicq, this.tgBot);
await this.setupCommands();
this.setupCommands()
.then(() => this.log.info('命令设置成功'))
.catch(e => this.log.error('命令设置错误', e));
if (this.id === 0) {
this.instanceManageController = new InstanceManageController(this, this.tgBot);
}