mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 18:59:19 +00:00
Add new music player debug
This commit is contained in:
@@ -14,7 +14,7 @@ const EMBEDS = {
|
||||
fields: [
|
||||
{
|
||||
name: 'Available arguments',
|
||||
value: '``invalidInteraction`` ``crashMusicPlayer`` ``crash``'
|
||||
value: '``invalidInteraction`` ``crashMusicPlayer`` ``crash`` ``activemusicplayer``'
|
||||
}
|
||||
],
|
||||
user: (data instanceof Interaction) ? data.user : data.author
|
||||
@@ -35,6 +35,13 @@ const EMBEDS = {
|
||||
user: (data instanceof Interaction) ? data.user : data.author
|
||||
});
|
||||
},
|
||||
ACTIVE_MUSIC_PLAYERS: (data: Message | Interaction, totalplayers: Map<any, any>) => {
|
||||
return makeInfoEmbed({
|
||||
icon: '🎵',
|
||||
title: `Total active music players: ${totalplayers.size}`,
|
||||
user: (data instanceof Interaction) ? data.user : data.author
|
||||
});
|
||||
},
|
||||
NOT_DEVELOPER: (data: Message | Interaction) => {
|
||||
return makeErrorEmbed({
|
||||
title: 'Developer only',
|
||||
@@ -96,6 +103,9 @@ export default class Debug extends DiscordModule {
|
||||
|
||||
instance._fake_error_on_player();
|
||||
},
|
||||
activeMusicPlayer: async (data: HybridInteractionMessage) => {
|
||||
await sendHybridInteractionMessageResponse(data, { embeds: [EMBEDS.ACTIVE_MUSIC_PLAYERS(data.getRaw(), DiscordMusicPlayer.GuildQueue)] });
|
||||
},
|
||||
invalidInteraction: async (data: HybridInteractionMessage) => {
|
||||
|
||||
const row = new MessageActionRow()
|
||||
@@ -131,6 +141,8 @@ export default class Debug extends DiscordModule {
|
||||
return await funct.invalidInteraction(data);
|
||||
case "crashmusicplayer":
|
||||
return await funct.crashMusicPlayer(data);
|
||||
case "activemusicplayer":
|
||||
return await funct.activeMusicPlayer(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user