diff --git a/src/commands/Link.ts b/src/commands/Link.ts index 0b0d65b..63a2185 100644 --- a/src/commands/Link.ts +++ b/src/commands/Link.ts @@ -8,7 +8,7 @@ export default { .setName('link') .setDescription('Link Discord and Game accaunt') .setDescriptionLocalization("ru", "Связь Discord и Игрового аккаунта") - .addStringOption(opt => opt.setName("id").setDescription("Steam64 or SLG ID").setDescriptionLocalization("ru", "Steam64 or SLG ID").setRequired(true)) + .addStringOption(opt => opt.setName("id").setDescription("SteamID64 or SLGID").setDescriptionLocalization("ru", "SteamID64 или SLGID").setRequired(true)) .addStringOption(opt => opt.setName("code").setDescription("Confirmation code").setDescriptionLocalization("ru", "Код подтверждения").setRequired(false)), async execute(interaction) { var id = interaction.options.getString('id') diff --git a/src/controller/ChatController.ts b/src/controller/ChatController.ts index 8e17264..39bf3e4 100644 --- a/src/controller/ChatController.ts +++ b/src/controller/ChatController.ts @@ -66,8 +66,9 @@ export default class ChatController { } messages.forEach(async m => { - if (m.Receiver in ["Общий", "General"] && m.Receiver !== global.config.inGameChat) + if (["Общий", "General"].indexOf(m.Receiver) > -1 && m.Receiver !== global.config.inGameChat) global.config.inGameChat = m.Receiver + if (global.config.messageTime !== m.Timestamp) { if (global.config.messageTime < m.Timestamp) global.config.messageTime = m.Timestamp