Make CI happy x2

This commit is contained in:
ayntee 2020-12-26 10:49:52 +04:00
parent e25b7a8f5b
commit c7d117cd54
4 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@ export const guildEmojiUpdate: GatewayEventHandler = async (
const _updated: EmojiPayload[] = []
for (const raw of d.emojis) {
const emojiID = raw.id !== null ? raw.id : raw.name
const emojiID = (raw.id !== null ? raw.id : raw.name) as string
const has = emojis.get(emojiID)
if (has === undefined) {
await guild.emojis.set(emojiID, raw)
@ -27,7 +27,7 @@ export const guildEmojiUpdate: GatewayEventHandler = async (
}
for (const emoji of emojis.values()) {
const emojiID = emoji.id !== null ? emoji.id : emoji.name
const emojiID = (emoji.id !== null ? emoji.id : emoji.name) as string
const find = _updated.find((e) => {
const eID = e.id !== null ? e.id : e.name
return emojiID === eID
@ -36,7 +36,7 @@ export const guildEmojiUpdate: GatewayEventHandler = async (
await guild.emojis.delete(emojiID)
deleted.push(emoji)
} else {
const foundID = find.id !== null ? find.id : find.name
const foundID = (find.id !== null ? find.id : find.name) as string
const before = (await guild.emojis.get(foundID)) as Emoji
await guild.emojis.set(foundID, find)
const after = (await guild.emojis.get(foundID)) as Emoji

View File

@ -29,7 +29,7 @@ export const messageReactionAdd: GatewayEventHandler = async (
} else return
}
const emojiID = d.emoji.id !== null ? d.emoji.id : d.emoji.name
const emojiID = (d.emoji.id !== null ? d.emoji.id : d.emoji.name) as string
let reaction = await message.reactions.get(emojiID)
if (reaction === undefined) {
await message.reactions.set(emojiID, {

View File

@ -27,7 +27,7 @@ export const messageReactionRemove: GatewayEventHandler = async (
} else return
}
const emojiID = d.emoji.id !== null ? d.emoji.id : d.emoji.name
const emojiID = (d.emoji.id !== null ? d.emoji.id : d.emoji.name) as string
const reaction = await message.reactions.get(emojiID)
if (reaction === undefined) return

View File

@ -19,7 +19,7 @@ export const messageReactionRemoveEmoji: GatewayEventHandler = async (
} else return
}
const emojiID = d.emoji.id !== null ? d.emoji.id : d.emoji.name
const emojiID = (d.emoji.id !== null ? d.emoji.id : d.emoji.name) as string
const reaction = await message.reactions.get(emojiID)
if (reaction === undefined) return