From b68a5eca6f6385d9e04a8dcf8095bac4eacf4c11 Mon Sep 17 00:00:00 2001 From: TriForMine Date: Mon, 18 Oct 2021 20:34:58 +0200 Subject: [PATCH] Some changes --- src/helpers/messages/add_reactions.ts | 7 +++---- src/helpers/messages/suppress_embeds.ts | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/helpers/messages/add_reactions.ts b/src/helpers/messages/add_reactions.ts index 9a013414e..4fe1fbff0 100644 --- a/src/helpers/messages/add_reactions.ts +++ b/src/helpers/messages/add_reactions.ts @@ -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); } } } diff --git a/src/helpers/messages/suppress_embeds.ts b/src/helpers/messages/suppress_embeds.ts index 59bc2400d..d9f3e9713 100644 --- a/src/helpers/messages/suppress_embeds.ts +++ b/src/helpers/messages/suppress_embeds.ts @@ -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);