small fixes

This commit is contained in:
The Foxon 2023-07-14 04:43:22 +12:00
parent cd9bcd61d1
commit 741dce6ea9
2 changed files with 3 additions and 2 deletions

View File

@ -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')

View File

@ -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