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

View file

@ -29,7 +29,7 @@ export const messageReactionAdd: GatewayEventHandler = async (
} else return } 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) let reaction = await message.reactions.get(emojiID)
if (reaction === undefined) { if (reaction === undefined) {
await message.reactions.set(emojiID, { await message.reactions.set(emojiID, {

View file

@ -27,7 +27,7 @@ export const messageReactionRemove: GatewayEventHandler = async (
} else return } 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) const reaction = await message.reactions.get(emojiID)
if (reaction === undefined) return if (reaction === undefined) return

View file

@ -19,7 +19,7 @@ export const messageReactionRemoveEmoji: GatewayEventHandler = async (
} else return } 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) const reaction = await message.reactions.get(emojiID)
if (reaction === undefined) return if (reaction === undefined) return