Skip to content

Commit b6accb0

Browse files
committed
fix(commands): incorect channel's name format
1 parent b02ee87 commit b6accb0

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

rustmail/src/commands/take/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub async fn rename_channel_with_timeout(
1515
) -> ModmailResult<()> {
1616
let rename_future = channel_id.edit(
1717
&ctx.http,
18-
EditChannel::new().name(format!("🔵-{}", new_name)),
18+
EditChannel::new().name(new_name.clone()),
1919
);
2020
let timeout = sleep(Duration::from_secs(2));
2121

@@ -57,7 +57,7 @@ pub async fn rename_channel_with_timeout(
5757
None
5858
};
5959

60-
if let Err(e) = channel_id.edit(&ctx.http, EditChannel::new().name(format!("🔵-{}", new_name))).await {
60+
if let Err(e) = channel_id.edit(&ctx.http, EditChannel::new().name(new_name)).await {
6161
return Err(ModmailError::Discord(DiscordError::ApiError(e.to_string())));
6262
}
6363

rustmail/src/commands/take/slash_command/take.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl RegistrableCommand for TakeCommand {
9393
&ctx,
9494
&config,
9595
thread_id,
96-
command.user.name.clone(),
96+
format!("🔵-{}", command.user.name.clone()),
9797
None,
9898
Some(&command),
9999
)

rustmail/src/commands/take/text_command/take.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub async fn take(
4444
&ctx,
4545
config,
4646
thread_id,
47-
msg.author.name.clone(),
47+
format!("🔵-{}", msg.author.name.clone()),
4848
Some(&msg),
4949
None,
5050
)

0 commit comments

Comments
 (0)