mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
initial push to remix-bot/fluxer
This commit is contained in:
commit
2820cc881c
63 files changed
+16005
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import { CommandBuilder } from "../src/CommandHandler.mjs";
|
||||
import { EmbedBuilder } from "@fluxerjs/core";
|
||||
import { getGlobalColor } from "../src/MessageHandler.mjs";
|
||||
|
||||
export const command = new CommandBuilder()
|
||||
.setName("debug")
|
||||
.setDescription("A debug command for various purposes.")
|
||||
.setRequirement(r => r.setOwnerOnly(true))
|
||||
.setCategory("util")
|
||||
.addChoiceOption(o =>
|
||||
o.setName("target")
|
||||
.setDescription("The target that should be examined.")
|
||||
.addChoices("voice")
|
||||
.setRequired(true));
|
||||
|
||||
export function run(msg, data) {
|
||||
switch (data.get("target").value) {
|
||||
case "voice": {
|
||||
const servers = [...this.players.playerMap.entries()].map(([cid, s]) => {
|
||||
const channel = this.client.channels.cache.get(cid);
|
||||
return {
|
||||
name: channel?.name ?? "unknown",
|
||||
id: channel?.id ?? cid,
|
||||
status: s.connection?.state?.status ?? "unknown",
|
||||
guildname: channel?.guild?.name ?? "unknown",
|
||||
guildid: channel?.guildId ?? "unknown"
|
||||
};
|
||||
});
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setTitle("🔧 Voice Debug")
|
||||
.setDescription("```json\n" + JSON.stringify(servers, null, 2) + "\n```")
|
||||
.toJSON();
|
||||
msg.replyEmbed({ embeds: [embed] });
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user