Commit b7548e5e authored by tec's avatar tec

No empty motions

parent b52907ba
......@@ -57,7 +57,16 @@ impl EventHandler for Handler {
let mut iter = msg.content.chars();
iter.by_ref().nth(5);
let topic = iter.as_str();
create_motion(&ctx, &msg, topic);
if topic == "" {
if let Err(why) = msg.channel_id.say(
&ctx.http,
"If there's something you want to motion, put it after the !move keyword",
) {
println!("Error sending message: {:?}", why);
}
} else {
create_motion(&ctx, &msg, topic);
}
} else if msg.content.starts_with("!motion") {
if let Err(why) = msg.channel_id.say(&ctx.http, "I hope you're not having a motion. You may have wanted to !move something instead.") {
println!("Error sending message: {:?}", why);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment