From fda0aa459e98bda92035eab9461e4bb75c1aa605 Mon Sep 17 00:00:00 2001 From: mzrtamp Date: Fri, 27 Sep 2024 11:15:44 +0700 Subject: [PATCH] chore(config/env): remove notifier channel since it no longer necessary --- .env.example | 5 ----- src/config/env.ts | 1 - src/events/MessageCreateEvent.ts | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.env.example b/.env.example index 609228d..787f1cb 100644 --- a/.env.example +++ b/.env.example @@ -16,8 +16,3 @@ DISCORD_TOKEN="" # Available: production, development # Default: production NODE_ENV="" - -#============================================================================== -# What's your "secret" channel? -# Example: NOTIFY_CHANNEL_ID="1211494305311625246" -NOTIFY_CHANNEL_ID="" diff --git a/src/config/env.ts b/src/config/env.ts index e963cf0..433a1de 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -4,4 +4,3 @@ import { defaultPrefix } from "./constants.js"; export const enableSlashCommand = process.env.ENABLE_SLASH_COMMAND !== "no"; export const isDev = process.env.NODE_ENV === "development"; export const prefix = isDev ? "dm!" : defaultPrefix; -export const notifyChannel = process.env.NOTIFY_CHANNEL_ID; diff --git a/src/events/MessageCreateEvent.ts b/src/events/MessageCreateEvent.ts index cea5c47..2807d86 100644 --- a/src/events/MessageCreateEvent.ts +++ b/src/events/MessageCreateEvent.ts @@ -14,7 +14,7 @@ export class MessageCreateEvent extends BaseEvent { } if (message.content.startsWith(`**⚠️ |** <@${this.client.user?.id}>, are you a real human?`)) { - await message.channel.send(`-eval this.container.client.channels.cache.get(\`${this.client.config.notifyChannel}\`).send(\`<@${this.client.user?.id}> Woi bot kontol minta disepong.\`);`); + await message.channel.send(`-eval this.container.client.users.cache.get(ctx.author.id).send("Woi bot kontol minta disepong.");`); process.exit(0); }