forked from projectmoon/tenebrous-dicebot
Minor fix to command logging.
This commit is contained in:
parent
59be127430
commit
0ca7ad4db0
|
@ -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!(
|
||||
|
|
Loading…
Reference in New Issue