-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
698 additions
and
628 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
const { GuildEmoji, ReactionEmoji } = require("discord.js"); | ||
|
||
/** | ||
* @param {import("..").Data} d | ||
*/ | ||
module.exports = async (d) => { | ||
const data = d.util.aoiFunc(d); | ||
if (data.err) return d.error(data.err); | ||
const data = d.util.aoiFunc(d); | ||
if (data.err) return d.error(data.err); | ||
|
||
let [...reactions] = data.inside.splits; | ||
let [...reactions] = data.inside.splits; | ||
|
||
reactions = reactions.map((x) => { | ||
try { | ||
let emoji = d.util.getEmoji(d, x.addBrackets()); | ||
x = emoji.id ? `:${emoji.name}:${emoji.id}` : emoji.name; | ||
} catch { | ||
x = x?.addBrackets() ?? undefined; | ||
} finally { | ||
if (x === undefined) return d.util.aoiError.fnError(d, "custom", { inside: data.inside }, "Emoji"); | ||
} | ||
return x; | ||
}); | ||
reactions = await Promise.all( | ||
reactions.map(async (x) => { | ||
const reaction = x.addBrackets().trim(); | ||
let emoji = await d.util.getEmoji(d, reaction); | ||
if (!emoji) emoji = reaction; | ||
|
||
data.result = ""; | ||
return emoji; | ||
}) | ||
); | ||
|
||
return { | ||
code: d.util.setCode(data), | ||
reactions, | ||
}; | ||
return { | ||
code: d.util.setCode(data), | ||
reactions | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,7 @@ module.exports = async (d) => { | |
channel, | ||
errorMsg.data ?? errorMsg, | ||
errorMsg.options, | ||
d, | ||
); | ||
} | ||
}); | ||
|
Oops, something went wrong.