Last active
February 22, 2021 15:37
-
-
Save adeonhy/7120256f829a6cc70a6488d0c353b771 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async fn get_command_type(msg: &Message) -> (CommandTypeId,u8){ | |
let command_str = &msg.content; | |
if let Ok(n) = scan_fmt(command_str, "!ひよこスロット*{d}", u8) { | |
if n >= 10 { | |
return (CommandTypeId::HiyokoSlot,1); | |
} else { | |
return (CommandTypeId::HiyokoSlot,n); | |
} | |
} else if command_str.starts_with("!ひよこスロット") { | |
return (CommandTypeId::HiyokoSlot,1); | |
} else { | |
return (CommandTypeId::UnknownCommand,0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment