Improve code coverage

This commit is contained in:
Cadence Ember 2023-10-07 22:47:31 +13:00
parent 0b40a50254
commit 0e56255f82
8 changed files with 118 additions and 10 deletions

View file

@ -125,7 +125,7 @@ turndownService.addRule("emoji", {
// Also guess a suitable emoji based on the ID (if available) or name
let guess = null
const guessedName = node.getAttribute("title").replace(/^:|:$/g, "")
for (const guild of discord?.guilds.values() || []) {
for (const guild of discord.guilds.values()) {
/** @type {{name: string, id: string, animated: number}[]} */
// @ts-ignore
const emojis = guild.emojis