Time simplification

This commit is contained in:
kageru 2021-11-20 16:58:27 +01:00
parent e6d48ab0a7
commit cc3aec0b9f
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2

View File

@ -107,7 +107,7 @@ async fn main() {
async fn name(ctx: &Context, msg: &Message) -> CommandResult {
if let Some((_, name)) = msg.content.split_once(' ') {
let (name, adjustment) = name.split_once(" -").unwrap_or((name, "0"));
let adjustment = adjustment.strip_suffix("h").unwrap_or(adjustment);
let adjustment = adjustment.trim_end_matches('h');
msg.guild(&ctx)
.await
.unwrap()