forked from sorceress/rustcord
Minor cleanup
This commit is contained in:
parent
7ade211de6
commit
4cd7ee7e4f
|
@ -1194,7 +1194,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustcord"
|
name = "rustcord"
|
||||||
version = "0.2.6"
|
version = "0.2.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"owoify 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"owoify 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "rustcord"
|
name = "rustcord"
|
||||||
version = "0.2.6"
|
version = "0.2.7"
|
||||||
authors = ["Agatha <@protonmail.com>"]
|
authors = ["Agatha <@protonmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ fn list_srv(ctx: &mut Context, message: &Message) -> CommandResult {
|
||||||
}
|
}
|
||||||
let _ = message.channel_id.say(
|
let _ = message.channel_id.say(
|
||||||
&ctx.http,
|
&ctx.http,
|
||||||
list.replace("@everyone", "@\u{200B}everyone").to_string(),
|
list.replace("@everyone", "@\u{200B}everyone"),
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -399,15 +399,15 @@ fn compare_bot(ctx: &mut Context, message: &Message, mut args: Args) -> CommandR
|
||||||
#[aliases("what's this")]
|
#[aliases("what's this")]
|
||||||
fn what(ctx: &mut Context, message: &Message, args: Args) -> CommandResult {
|
fn what(ctx: &mut Context, message: &Message, args: Args) -> CommandResult {
|
||||||
let text: String = args.rest().trim().to_string();
|
let text: String = args.rest().trim().to_string();
|
||||||
let defs = &urbandict::get_definitions(&text.to_string());
|
let defs = &urbandict::get_definitions(&text);
|
||||||
match defs {
|
match defs {
|
||||||
Err(_e) => {
|
Err(_e) => {
|
||||||
let _ = message
|
let _ = message
|
||||||
.channel_id
|
.channel_id
|
||||||
.say(&ctx.http, format!("Invalid query >w<"));
|
.say(&ctx.http, "Invalid query >w<".to_string());
|
||||||
}
|
}
|
||||||
Ok(v) => {
|
Ok(v) => {
|
||||||
if v.len() > 0 {
|
if !v.is_empty() {
|
||||||
let def = &v[0];
|
let def = &v[0];
|
||||||
let _ = message.channel_id.send_message(&ctx.http, |m| {
|
let _ = message.channel_id.send_message(&ctx.http, |m| {
|
||||||
m.embed(|e| {
|
m.embed(|e| {
|
||||||
|
|
Loading…
Reference in New Issue