Set Room Command #78

Manually merged
projectmoon merged 4 commits from set-room-command into master 2021-05-28 22:05:12 +00:00
1 changed files with 4 additions and 2 deletions
Showing only changes of commit 0ca7ad4db0 - Show all commits

View File

@ -132,14 +132,16 @@ fn log_command(cmd: &(impl Command + ?Sized), ctx: &Context, result: &ExecutionR
use substring::Substring;
let command = match cmd.is_secure() {
true => cmd.name(),
false => ctx.message_body.substring(0, 30),
false => ctx.message_body,
};
let dots = match ctx.message_body.len() {
let dots = match command.len() {
_len if _len > 30 => "[...]",
_ => "",
};
let command = command.substring(0, 30);
match result {
Ok(_) => {
info!(