main
DaXcess 2024-08-19 12:34:51 +02:00
parent bba96969e2
commit d0acf77f88
No known key found for this signature in database
GPG Key ID: CF78CC72F0FD5EAD
3 changed files with 11 additions and 10 deletions

View File

@ -3,6 +3,7 @@
## 2.2.1 | TBD ## 2.2.1 | TBD
- Added new option: `/playing` can now receive an updating behavior parameter - Added new option: `/playing` can now receive an updating behavior parameter
- Added album name to `/playing` embed
- Fixed a bug where uncached guilds would panic the bot - Fixed a bug where uncached guilds would panic the bot
- Fixed small issue with embed styling - Fixed small issue with embed styling
- Updated to Rust 1.80.1 (from 1.79.0) - Updated to Rust 1.80.1 (from 1.79.0)

View File

@ -5,7 +5,7 @@ WORKDIR /app
# Add extra build dependencies here # Add extra build dependencies here
RUN apt-get update && apt-get install -yqq \ RUN apt-get update && apt-get install -yqq \
cmake gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu cmake gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu libpq-dev
COPY . . COPY . .

View File

@ -407,23 +407,23 @@ fn build_embed(playback_info: &PlaybackInfo, owner: &User) -> CreateEmbed {
} }
if let Some(album_name) = playback_info.album_name() { if let Some(album_name) = playback_info.album_name() {
description += &format!("In album: **{album_name}**\n\n"); description += &format!("Album: **{album_name}**\n");
} else {
description += "\n";
} }
if let Some(show_name) = playback_info.show_name() { if let Some(show_name) = playback_info.show_name() {
description += &format!("On {show_name}\n\n"); description += &format!("On {show_name}\n");
} }
description += "\n";
let position = playback_info.current_position(); let position = playback_info.current_position();
let index = position * 20 / playback_info.duration(); let index = position * 20 / playback_info.duration();
description.push_str(if playback_info.playing() { description += if playback_info.playing() {
"▶️ " "▶️ "
} else { } else {
"⏸️ " "⏸️ "
}); };
for i in 0..20 { for i in 0..20 {
if i == index { if i == index {
@ -433,12 +433,12 @@ fn build_embed(playback_info: &PlaybackInfo, owner: &User) -> CreateEmbed {
} }
} }
description.push_str("\n:alarm_clock: "); description += "\n:alarm_clock: ";
description.push_str(&format!( description += &format!(
"{} / {}", "{} / {}",
spoticord_utils::time_to_string(position / 1000), spoticord_utils::time_to_string(position / 1000),
spoticord_utils::time_to_string(playback_info.duration() / 1000) spoticord_utils::time_to_string(playback_info.duration() / 1000)
)); );
CreateEmbed::new() CreateEmbed::new()
.author( .author(