Minor cleanup

This commit is contained in:
EvilDeaaaadd 2020-01-16 22:40:12 +02:00
parent 30295fd4a5
commit 95b3655a30
3 changed files with 6 additions and 6 deletions

2
Cargo.lock generated
View File

@ -1194,7 +1194,7 @@ dependencies = [
[[package]]
name = "rustcord"
version = "0.2.6"
version = "0.2.7"
dependencies = [
"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)",

View File

@ -1,6 +1,6 @@
[package]
name = "rustcord"
version = "0.2.6"
version = "0.2.7"
authors = ["Agatha <EvilDeaaaadd@protonmail.com>"]
edition = "2018"

View File

@ -135,7 +135,7 @@ fn list_srv(ctx: &mut Context, message: &Message) -> CommandResult {
}
let _ = message.channel_id.say(
&ctx.http,
list.replace("@everyone", "@\u{200B}everyone").to_string(),
list.replace("@everyone", "@\u{200B}everyone"),
);
Ok(())
@ -399,15 +399,15 @@ fn compare_bot(ctx: &mut Context, message: &Message, mut args: Args) -> CommandR
#[aliases("what's this")]
fn what(ctx: &mut Context, message: &Message, args: Args) -> CommandResult {
let text: String = args.rest().trim().to_string();
let defs = &urbandict::get_definitions(&text.to_string());
let defs = &urbandict::get_definitions(&text);
match defs {
Err(_e) => {
let _ = message
.channel_id
.say(&ctx.http, format!("Invalid query >w<"));
.say(&ctx.http, "Invalid query >w<".to_string());
}
Ok(v) => {
if v.len() > 0 {
if !v.is_empty() {
let def = &v[0];
let _ = message.channel_id.send_message(&ctx.http, |m| {
m.embed(|e| {