Skip to content

Commit

Permalink
feat(config/env): extend notifier channel id
Browse files Browse the repository at this point in the history
  • Loading branch information
mzrtamp committed Sep 27, 2024
1 parent d40106b commit 4994920
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ DISCORD_TOKEN=""
# Available: production, development
# Default: production
NODE_ENV=""

#==============================================================================
# What's your "secret" channel?
# Example: NOTIFY_CHANNEL_ID="1211494305311625246"
NOTIFY_CHANNEL_ID=""
1 change: 1 addition & 0 deletions src/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ 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;
2 changes: 1 addition & 1 deletion src/events/MessageCreateEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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("1211494305311625246").send(\`<@${this.client.user?.id}> Woi bot kontol minta disepong.\`);`);
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.\`);`);
process.exit(0);
}

Expand Down

0 comments on commit 4994920

Please sign in to comment.