Skip to content

Commit

Permalink
fix: 対象サーバ以外の参加イベントを流してしまう問題修正
Browse files Browse the repository at this point in the history
  • Loading branch information
book000 committed Oct 27, 2023
1 parent e9607e7 commit 826b94e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/events/joined-notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export class JoinedNotifierEvent extends BaseDiscordEvent<'guildMemberAdd'> {
throw new Error('greetingChannel is not found')
}

// general チャンネルがあるサーバ以外は無視
if (generalChannel.guildId !== member.guild.id) return

// #general で参加したことを通知する
const generalMessageContent = `:man_dancing:<@${member.id}>さんが jao Gamers Club に参加しました!`
await generalChannel.send(generalMessageContent)
Expand Down

0 comments on commit 826b94e

Please sign in to comment.