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,
|
||||
mut source: Vec<Song>,
|
||||
) -> 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);
|
||||
|
||||
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();
|
||||
|
||||
if media_lock
|
||||
.db()
|
||||
.execute(
|
||||
&format!(
|
||||
"INSERT INTO {} (name)
|
||||
match media_lock.db().execute(
|
||||
&format!(
|
||||
"INSERT INTO {} (name)
|
||||
VALUES (?1)",
|
||||
tag
|
||||
),
|
||||
params![song_name],
|
||||
)
|
||||
.is_err()
|
||||
{
|
||||
msg.channel_id.say(
|
||||
tag
|
||||
),
|
||||
params![song_name],
|
||||
) {
|
||||
Ok(_) => msg
|
||||
.channel_id
|
||||
.say(&ctx.http, format!("add tag ({}) to {}", tag, song_name))?,
|
||||
Err(_) => msg.channel_id.say(
|
||||
&ctx.http,
|
||||
format!("could not add tag ({}) for {}", tag, song_name),
|
||||
)?;
|
||||
}
|
||||
)?,
|
||||
};
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue