Skip to content

Commit

Permalink
自己紹介チャンネルを追加した
Browse files Browse the repository at this point in the history
  • Loading branch information
ICTSC2024 committed Nov 13, 2024
1 parent 829c7dd commit ed5d479
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/bot/channels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::bot::helpers::channels::GuildChannelDefinitionBuilder;
use crate::bot::Bot;
use crate::models::Team;

static STAFF_CATEGORY_NAME: &str = "ICTSC2023 Staff";
static STAFF_CATEGORY_NAME: &str = "ICTSC2024 Staff";

// Discordの使い方を案内するread-onlyなチャンネル
static HELP_CHANNEL_NAME: &str = "help";
Expand All @@ -19,6 +19,9 @@ static ANNOUNCE_CHANNEL_NAME: &str = "announce";
// 参加者が自由に読み書きできるチャンネル
static RANDOM_CHANNEL_NAME: &str = "random";

// 自己紹介チャンネル
static SELF_INTRODUCE_CHANNEL_NAME: &str = "自己紹介";

static TEXT_CHANNEL_NAME_SUFFIX: &str = "text";
static VOICE_CHANNEL_NAME_SUFFIX: &str = "voice";

Expand Down Expand Up @@ -106,10 +109,19 @@ impl Bot {

let permissions_for_random_channel =
self.get_permission_overwrites_for_random_channel().await?;

channels.push(
GuildChannelDefinitionBuilder::default()
.name(RANDOM_CHANNEL_NAME.to_string())
.kind(ChannelType::Text)
.permissions(permissions_for_random_channel.clone())
.build()?,
);

channels.push(
GuildChannelDefinitionBuilder::default()
.name(SELF_INTRODUCE_CHANNEL_NAME.to_string())
.kind(ChannelType::Text)
.permissions(permissions_for_random_channel)
.build()?,
);
Expand Down

0 comments on commit ed5d479

Please sign in to comment.