summaryrefslogtreecommitdiff
path: root/packages/gateway/src/commands/delete.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gateway/src/commands/delete.ts')
-rw-r--r--packages/gateway/src/commands/delete.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/gateway/src/commands/delete.ts b/packages/gateway/src/commands/delete.ts
index 8b36eb9..20d0881 100644
--- a/packages/gateway/src/commands/delete.ts
+++ b/packages/gateway/src/commands/delete.ts
@@ -1,4 +1,5 @@
import { Message } from "discord.js";
+import { replyWithCleanup } from "../utilities";
export const handleDeleteCommand = async (message: Message) => {
if (message.author.bot) return;
@@ -8,7 +9,10 @@ export const handleDeleteCommand = async (message: Message) => {
const ownerId = application?.owner?.id;
if (message.author.id !== ownerId) {
- await message.reply("❌ Only the server owner can use this command.");
+ await replyWithCleanup(
+ message,
+ "❌ Only the server owner can use this command.",
+ );
return;
}
@@ -16,7 +20,8 @@ export const handleDeleteCommand = async (message: Message) => {
const parameters = message.content.split(" ").slice(1);
if (parameters.length < 1) {
- await message.reply(
+ await replyWithCleanup(
+ message,
"❌ Usage: `uma!delete <message_id> [channel_id]`\nExamples:\n- `uma!delete 1234567890123456789` (current channel)\n- `uma!delete 1234567890123456789 9876543210987654321` (specific channel)",
);