aboutsummaryrefslogtreecommitdiffstats
path: root/src/bot/music.rs
diff options
context:
space:
mode:
authorFelix Kaaman <tmtu@tmtu.ee>2020-02-22 19:24:05 +0200
committerFelix Kaaman <tmtu@tmtu.ee>2020-02-22 19:24:05 +0200
commitdbaaeb68bdf4143b9dca55b2baa86a2656a3249e (patch)
tree5bc007e03ef7782bbfeeb81ca936c97c992be1a2 /src/bot/music.rs
parent00b60b8f210b93a5d6cbdde2bc98feff2f2ec1ca (diff)
downloadpokebot-dbaaeb68bdf4143b9dca55b2baa86a2656a3249e.tar.gz
pokebot-dbaaeb68bdf4143b9dca55b2baa86a2656a3249e.zip
Add functions for BBCode formatting
Diffstat (limited to 'src/bot/music.rs')
-rw-r--r--src/bot/music.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bot/music.rs b/src/bot/music.rs
index 75e61de..2539695 100644
--- a/src/bot/music.rs
+++ b/src/bot/music.rs
@@ -12,8 +12,9 @@ use tsclientlib::{data, ChannelId, ClientId, ConnectOptions, Identity, Invoker,
use crate::audio_player::{AudioPlayer, AudioPlayerError, PollResult, Seek};
use crate::command::Command;
use crate::playlist::Playlist;
-use crate::teamspeak::TeamSpeakConnection;
+use crate::teamspeak as ts;
use crate::youtube_dl::AudioMetadata;
+use ts::TeamSpeakConnection;
#[derive(Debug)]
pub struct Message {
@@ -173,7 +174,7 @@ impl MusicBot {
fn start_playing_audio(&self, metadata: AudioMetadata) {
if let Some(title) = metadata.title {
- self.send_message(&format!("Playing '{}'", title));
+ self.send_message(&format!("Playing {}", ts::underline(&title)));
self.set_description(&format!("Currently playing '{}'", title));
} else {
self.send_message("Playing unknown title");
@@ -198,7 +199,7 @@ impl MusicBot {
}
} else {
if let Some(title) = metadata.title {
- self.send_message(&format!("Added '{}' to playlist", title));
+ self.send_message(&format!("Added {} to playlist", ts::underline(&title)));
} else {
self.send_message("Added to playlist");
}
@@ -293,7 +294,7 @@ impl MusicBot {
Command::Seek { amount } => {
if let Ok(seek) = parse_seek(&amount) {
if let Ok(time) = self.player.seek(seek) {
- self.send_message(&format!("New position: {}", time));
+ self.send_message(&format!("New position: {}", ts::bold(&time)));
} else {
self.send_message("Failed to seek");
}