Require echobox to have a parameter
This commit is contained in:
parent
fd1aecf4d3
commit
a7b9d801a1
@ -44,9 +44,13 @@ impl Module for EchoboxModule {
|
||||
match split_command(&message.content) {
|
||||
Some((command, in_quote)) => {
|
||||
if command == self.prefix {
|
||||
match echobox.echo(in_quote) {
|
||||
Ok(out_quote) => message.reply(&format!("**Quote #{}:** {}", out_quote.id, out_quote.content)),
|
||||
Err(error) => { error!("Error from echobox.echo(): {:?}", error) }
|
||||
if !in_quote.is_empty() {
|
||||
match echobox.echo(in_quote) {
|
||||
Ok(out_quote) => message.reply(&format!("**Echobox, quote #{}:** {}", out_quote.id, out_quote.content)),
|
||||
Err(error) => { error!("Error from echobox.echo(): {:?}", error) }
|
||||
}
|
||||
} else {
|
||||
message.reply("**Echobox:** Please enter a quote.");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user