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,24 @@
|
||||
import { CommandBuilder } from "../src/CommandHandler.mjs";
|
||||
import { EmbedBuilder } from "@fluxerjs/core";
|
||||
import { getGlobalColor } from "../src/MessageHandler.mjs";
|
||||
|
||||
export const command = new CommandBuilder()
|
||||
.setName("loop")
|
||||
.setDescription("Toggle the looping of your queue/song.", "commands.loop")
|
||||
.setCategory("music")
|
||||
.addChoiceOption(opt =>
|
||||
opt.setName("type")
|
||||
.addChoices("queue", "song")
|
||||
.setDescription("Specifies what loop should be toggled.", "options.loop.type")
|
||||
.setRequired(true));
|
||||
|
||||
export async function run(message, data) {
|
||||
const p = await this.getPlayer(message);
|
||||
if (!p) return;
|
||||
const res = p.loop(data.get("type").value);
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setDescription(res)
|
||||
.toJSON();
|
||||
message.replyEmbed({ embeds: [embed] });
|
||||
}
|
||||
Reference in new issue
Block a user