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