Little feedback improvements
This commit is contained in:
parent
f2f8f8f394
commit
2f88f7b04f
2 changed files with 22 additions and 14 deletions
|
@ -128,6 +128,15 @@ fn append_songs(
|
||||||
msg: &Message,
|
msg: &Message,
|
||||||
mut source: Vec<Song>,
|
mut source: Vec<Song>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
|
msg.channel_id.say(
|
||||||
|
&ctx.http,
|
||||||
|
format!(
|
||||||
|
"adding {} {} to playlist",
|
||||||
|
source.len(),
|
||||||
|
if source.len() == 1 { "song" } else { "songs" }
|
||||||
|
),
|
||||||
|
)?;
|
||||||
|
|
||||||
media.playlist_mut().append(&mut source);
|
media.playlist_mut().append(&mut source);
|
||||||
|
|
||||||
println!("start playing");
|
println!("start playing");
|
||||||
|
|
|
@ -51,23 +51,22 @@ fn tag(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult {
|
||||||
|
|
||||||
let song_name = media_lock.song_name();
|
let song_name = media_lock.song_name();
|
||||||
|
|
||||||
if media_lock
|
match media_lock.db().execute(
|
||||||
.db()
|
&format!(
|
||||||
.execute(
|
"INSERT INTO {} (name)
|
||||||
&format!(
|
|
||||||
"INSERT INTO {} (name)
|
|
||||||
VALUES (?1)",
|
VALUES (?1)",
|
||||||
tag
|
tag
|
||||||
),
|
),
|
||||||
params![song_name],
|
params![song_name],
|
||||||
)
|
) {
|
||||||
.is_err()
|
Ok(_) => msg
|
||||||
{
|
.channel_id
|
||||||
msg.channel_id.say(
|
.say(&ctx.http, format!("add tag ({}) to {}", tag, song_name))?,
|
||||||
|
Err(_) => msg.channel_id.say(
|
||||||
&ctx.http,
|
&ctx.http,
|
||||||
format!("could not add tag ({}) for {}", tag, song_name),
|
format!("could not add tag ({}) for {}", tag, song_name),
|
||||||
)?;
|
)?,
|
||||||
}
|
};
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue