Skip to content

Commit

Permalink
ボットがVCに参加時に現在のギルド設定を表示するように変更
Browse files Browse the repository at this point in the history
  • Loading branch information
kosugikun committed Jun 27, 2023
1 parent 14ccb60 commit e893551
Show file tree
Hide file tree
Showing 9 changed files with 622 additions and 682 deletions.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ class JoinCmd(private var bot: Bot) : SlashCommand() {
builder.addField("読み上げ対象", channel.name, true)
}
try {
// ボイスチャンネル接続完了のメッセージに現在の設定を表示
event.guild!!.audioManager.openAudioConnection(userState.channel)
builder.addField("ボイスチャンネル", String.format("**%s**", userState.channel!!.name), false)
builder.setDescription("ボイスチャンネルへの接続に成功しました。")
builder.addField("設定",
"ユーザー名読み上げ:${if (settings.isReadName()) "有効" else "無効"}\n" +
"参加、退出読み上げ:${if (settings.isJoinAndLeaveRead()) "有効" else "無効"}", true)
event.hook.sendMessageEmbeds(builder.build()).queue()
ReadChannel.setChannel(event.guild!!.idLong, event.textChannel.idLong)
} catch (ex: PermissionException) {
Expand Down

0 comments on commit e893551

Please sign in to comment.