refactor!: move dirs outside of src/ (#2032)

This commit is contained in:
Skillz4Killz
2022-02-11 04:49:53 -05:00
committed by GitHub
parent 471ef5cb6c
commit 8aaea9f339
594 changed files with 84 additions and 66 deletions
+19
View File
@@ -0,0 +1,19 @@
import type { Bot } from "../../bot.ts";
/** Adds multiple reactions to a message. If `ordered` is true(default is false), it will add the reactions one at a time in the order provided. Note: Reaction takes the form of **name:id** for custom guild emoji, or Unicode characters. Requires READ_MESSAGE_HISTORY and ADD_REACTIONS */
export async function addReactions(
bot: Bot,
channelId: bigint,
messageId: bigint,
reactions: string[],
ordered = false,
) {
if (!ordered) {
await Promise.all(reactions.map((reaction) => bot.helpers.addReaction(channelId, messageId, reaction)));
} else {
for (const reaction of reactions) {
bot.events.debug("Running for of loop in addReactions function.");
await bot.helpers.addReaction(channelId, messageId, reaction);
}
}
}