-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Returned message when added songs/playlists. Returned player creation. Returned pause/resume. Refactored checkInVoice functions.
- Loading branch information
1 parent
1617947
commit a962a93
Showing
23 changed files
with
171 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/sh | ||
docker compose up --detach --force-recreate --no-build --remove-orphans | ||
docker compose up --detach --force-recreate --build --remove-orphans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,38 @@ | ||
// @ts-nocheck | ||
import { EmbedBuilder } from 'discord.js'; | ||
import i18next from 'i18next'; | ||
import { getIconFromSource } from './getIconFromSource.js'; | ||
import { nodeResponse } from 'riffy'; | ||
|
||
export function generateAddedPlaylistMessage(playlist: nodeResponse) { | ||
const serviceIcon = getIconFromSource(playlist.pluginInfo?.name ?? undefined); | ||
const serviceIcon = getIconFromSource(playlist.tracks[0].info.sourceName ?? undefined); | ||
|
||
return new EmbedBuilder() | ||
.setTitle(playlist.name ? `${serviceIcon} ${playlist.name}` : i18next.t('audioplayer:player_embed_unknown')) | ||
.setURL(playlist.url ?? null) | ||
.setAuthor({ name: `${i18next.t('audioplayer:event_add_list')}` }) | ||
.setThumbnail(playlist.thumbnail ?? null) | ||
.addFields( | ||
{ | ||
name: `${i18next.t('audioplayer:player_embed_requester')}`, | ||
value: `${playlist.member!.user.toString()}`, | ||
inline: true | ||
}, | ||
{ | ||
name: `${i18next.t('audioplayer:event_add_list_songs_count')}`, | ||
value: `\`${playlist.songs.length}\``, | ||
inline: true | ||
}, | ||
{ | ||
name: `${i18next.t('audioplayer:event_add_song_length')}`, | ||
value: `\`${playlist.formattedDuration}\``, | ||
inline: true | ||
} | ||
); | ||
return ( | ||
new EmbedBuilder() | ||
.setTitle( | ||
playlist.playlistInfo?.name | ||
? `${serviceIcon} ${playlist.playlistInfo.name}` | ||
: i18next.t('audioplayer:player_embed_unknown') | ||
) | ||
// @ts-expect-error because | ||
.setURL(playlist.pluginInfo?.url ?? null) | ||
.setAuthor({ name: `${i18next.t('audioplayer:event_add_list')}` }) | ||
.setThumbnail(playlist.tracks[0].info.thumbnail ?? null) | ||
.addFields( | ||
{ | ||
name: `${i18next.t('audioplayer:player_embed_requester')}`, | ||
value: `${playlist.tracks[0].info.requester}`, | ||
inline: true | ||
}, | ||
{ | ||
name: `${i18next.t('audioplayer:event_add_list_songs_count')}`, | ||
value: `\`${playlist.tracks.length}\``, | ||
inline: true | ||
}, | ||
{ | ||
name: `${i18next.t('audioplayer:event_add_song_length')}`, | ||
value: `\`${99999}\``, | ||
inline: true | ||
} | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.