From 539e538d87034b93d06100f2c60a851b12fea694 Mon Sep 17 00:00:00 2001
From: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
Date: Thu, 7 Dec 2023 03:28:07 -0300
Subject: [PATCH] commandHelpers: use MessageActions import
---
src/api/Commands/commandHelpers.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/api/Commands/commandHelpers.ts b/src/api/Commands/commandHelpers.ts
index 2fd189032..8f4a88e4b 100644
--- a/src/api/Commands/commandHelpers.ts
+++ b/src/api/Commands/commandHelpers.ts
@@ -16,6 +16,7 @@
* along with this program. If not, see .
*/
+import { MessageActions } from "@utils/discord";
import { mergeDefaults } from "@utils/misc";
import { findByPropsLazy } from "@webpack";
import { SnowflakeUtils } from "@webpack/common";
@@ -25,7 +26,6 @@ import type { PartialDeep } from "type-fest";
import { Argument } from "./types";
const MessageCreator = findByPropsLazy("createBotMessage");
-const MessageSender = findByPropsLazy("receiveMessage");
export function generateId() {
return `-${SnowflakeUtils.fromTimestamp(Date.now())}`;
@@ -40,7 +40,7 @@ export function generateId() {
export function sendBotMessage(channelId: string, message: PartialDeep): Message {
const botMessage = MessageCreator.createBotMessage({ channelId, content: "", embeds: [] });
- MessageSender.receiveMessage(channelId, mergeDefaults(message, botMessage));
+ MessageActions.receiveMessage(channelId, mergeDefaults(message, botMessage));
return message as Message;
}