We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6226cb8 commit 5e78ce3Copy full SHA for 5e78ce3
src/pterodactyl/smp_commands.rs
@@ -293,7 +293,11 @@ async fn broadcast_message(
293
discord_sender += &format!(" {username}");
294
}
295
if discord_sender.len() > 32 {
296
- discord_sender.truncate(29);
+ let mut new_len = 29;
297
+ while !discord_sender.is_char_boundary(new_len) {
298
+ new_len -= 1;
299
+ }
300
+ discord_sender.truncate(new_len);
301
discord_sender += "...";
302
303
try_join_all(chat_bridge.discord_channels.iter().map(|channel| {
0 commit comments