Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ TWITCH_OAUTH_CLIENT_SECRET=
TWITCH_OAUTH_REDIRECT_URI=

DISCORD_TOKEN=
DISCORD_GENEREAL_CHAT_ID=
5 changes: 5 additions & 0 deletions app-modules/bot-discord/src/Events/GreetingsEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public function handle(Message $message, Discord $discord): void
return;
}

$allowedChannel = env('DISCORD_GENEREAL_CHAT_ID');
if ($message->channel_id != $allowedChannel) {
return;
}

$this->logger()->notice(sprintf('%s: %s', $message->author->username, $message->content));

$hour = now()->hour;
Expand Down