mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
Some changes
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import type { Bot } from "../../bot.ts";
|
||||
import { addReaction } from "./add_reaction.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(
|
||||
@@ -10,11 +9,11 @@ export async function addReactions(
|
||||
ordered = false
|
||||
) {
|
||||
if (!ordered) {
|
||||
await Promise.all(reactions.map((reaction) => addReaction(bot, channelId, messageId, reaction)));
|
||||
await Promise.all(reactions.map((reaction) => bot.helpers.addReaction(bot, channelId, messageId, reaction)));
|
||||
} else {
|
||||
for (const reaction of reactions) {
|
||||
bot.events.debug?.("loop", "Running for of loop in addReactions function.");
|
||||
await addReaction(bot, channelId, messageId, reaction);
|
||||
bot.events.debug("loop", "Running for of loop in addReactions function.");
|
||||
await bot.helpers.addReaction(bot, channelId, messageId, reaction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export async function suppressEmbeds(bot: Bot, channelId: bigint, messageId: big
|
||||
bot.rest,
|
||||
"patch",
|
||||
bot.constants.endpoints.CHANNEL_MESSAGE(channelId, messageId),
|
||||
bot.utils.snakelize({ flags: 4 })
|
||||
{ flags: 4 }
|
||||
);
|
||||
|
||||
return await bot.transformers.message(bot, result);
|
||||
|
||||
Reference in New Issue
Block a user