~phate/rsPhate

096719d029ea589d2235b7b2d8c930ea01e48cd2 — Ash 1 year, 2 months ago de5ca91
some slight changes
1 files changed, 4 insertions(+), 3 deletions(-)

M src/commands/noice.rs
M src/commands/noice.rs => src/commands/noice.rs +4 -3
@@ 1,3 1,4 @@
use log::{error, info};
use serenity::{
    framework::standard::{macros::command, CommandResult},
    http::AttachmentType,


@@ 22,8 23,8 @@ fn noice(ctx: &mut Context, msg: &Message) -> CommandResult {
        .expect("Could not get base name.");
    let path2 = format!("{}", String::from_utf8_lossy(&file.stdout).trim());
    let attachment = format!("attachment://{}", String::from_utf8_lossy(&name.stdout).trim());
    println!(
        "file: {}\nname: {}\nattachment: {}",
    info!(
        "\nfile: {}\nname: {}\nattachment: {}",
        String::from_utf8_lossy(&file.stdout).trim(),
        String::from_utf8_lossy(&name.stdout).trim(),
        attachment


@@ 38,7 39,7 @@ fn noice(ctx: &mut Context, msg: &Message) -> CommandResult {
    });

    if let Err(why) = msg {
        println!("Error sending message: {:?}", why);
        error!("Error sending message: {:?}", why);
    }

    Ok(())