feat: Updated /help command to be dynamic

This commit is contained in:
Marius Begby committed 2023-07-23 14:55:53 +02:00
1 parent 6af04f7b5c
commit b95a652f1c
15 files changed
+87 -13

No files matched your search

+4 -1
View File
@@ -13,10 +13,13 @@ const {
const { useQueue } = require('discord-player');
module.exports = {
isNew: false,
isBeta: true,
data: new SlashCommandBuilder()
.setName('filters')
.setDescription('Toggle various audio filters during playback.')
.setDMPermission(false),
.setDMPermission(false)
.setNSFW(false),
execute: async ({ interaction }) => {
if (await notInVoiceChannel(interaction)) {
return;
+4 -3
View File
@@ -5,12 +5,13 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { useQueue } = require('discord-player');
module.exports = {
isNew: false,
isBeta: false,
data: new SlashCommandBuilder()
.setName('leave')
.setDescription('Clear the track queue and remove the bot from voice channel.')
.setDMPermission(false),
// todo, allow command to be executed if bot is only member in voice channel
.setDMPermission(false)
.setNSFW(false),
execute: async ({ interaction }) => {
if (await notInVoiceChannel(interaction)) {
return;
+3
View File
@@ -6,10 +6,13 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { useQueue } = require('discord-player');
module.exports = {
isNew: false,
isBeta: true,
data: new SlashCommandBuilder()
.setName('loop')
.setDescription('Toggle looping a track, the whole queue or autoplay.')
.setDMPermission(false)
.setNSFW(false)
.addStringOption((option) =>
option
.setName('mode')
+4 -1
View File
@@ -6,10 +6,13 @@ const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder } = r
const { useQueue } = require('discord-player');
module.exports = {
isNew: false,
isBeta: false,
data: new SlashCommandBuilder()
.setName('nowplaying')
.setDescription('Show information about the track currently playing.')
.setDMPermission(false),
.setDMPermission(false)
.setNSFW(false),
execute: async ({ interaction }) => {
if (await notInVoiceChannel(interaction)) {
return;
+4 -1
View File
@@ -6,10 +6,13 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { useQueue } = require('discord-player');
module.exports = {
isNew: false,
isBeta: false,
data: new SlashCommandBuilder()
.setName('pause')
.setDescription('Pause or resume the current track.')
.setDMPermission(false),
.setDMPermission(false)
.setNSFW(false),
execute: async ({ interaction }) => {
if (await notInVoiceChannel(interaction)) {
return;
+3
View File
@@ -7,10 +7,13 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { useMainPlayer, useQueue } = require('discord-player');
module.exports = {
isNew: false,
isBeta: false,
data: new SlashCommandBuilder()
.setName('play')
.setDescription('Add a track or playlist to the queue by searching or url.')
.setDMPermission(false)
.setNSFW(false)
.addStringOption((option) =>
option
.setName('query')
+3
View File
@@ -5,10 +5,13 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { useQueue } = require('discord-player');
module.exports = {
isNew: false,
isBeta: false,
data: new SlashCommandBuilder()
.setName('queue')
.setDescription('Show the list of tracks added to the queue.')
.setDMPermission(false)
.setNSFW(false)
.addNumberOption((option) => option.setName('page').setDescription('Page number of the queue').setMinValue(1)),
execute: async ({ interaction }) => {
if (await notInVoiceChannel(interaction)) {
+3
View File
@@ -6,10 +6,13 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { useQueue } = require('discord-player');
module.exports = {
isNew: false,
isBeta: false,
data: new SlashCommandBuilder()
.setName('remove')
.setDescription('Remove a specific track from the queue.')
.setDMPermission(false)
.setNSFW(false)
.addNumberOption((option) =>
option
.setName('tracknumber')
+3
View File
@@ -6,10 +6,13 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { useQueue } = require('discord-player');
module.exports = {
isNew: false,
isBeta: false,
data: new SlashCommandBuilder()
.setName('seek')
.setDescription('Seek to a specified duration in the current track.')
.setDMPermission(false)
.setNSFW(false)
.addStringOption((option) =>
option
.setName('duration')
+3
View File
@@ -6,10 +6,13 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { useQueue } = require('discord-player');
module.exports = {
isNew: false,
isBeta: false,
data: new SlashCommandBuilder()
.setName('skip')
.setDescription('Skip current or specified track.')
.setDMPermission(false)
.setNSFW(false)
.addNumberOption((option) =>
option.setName('tracknumber').setDescription('Track number to skip to in the queue.').setMinValue(1)
),
+4 -3
View File
@@ -5,12 +5,13 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { useQueue } = require('discord-player');
module.exports = {
isNew: true,
isBeta: false,
data: new SlashCommandBuilder()
.setName('stop')
.setDescription('Stop playing audio and clear the track queue.')
.setDMPermission(false),
// todo, allow command to be executed if bot is only member in voice channel
.setDMPermission(false)
.setNSFW(false),
execute: async ({ interaction }) => {
if (await notInVoiceChannel(interaction)) {
return;
+3
View File
@@ -6,10 +6,13 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { useQueue } = require('discord-player');
module.exports = {
isNew: false,
isBeta: false,
data: new SlashCommandBuilder()
.setName('volume')
.setDescription('Show or set the playback volume for tracks.')
.setDMPermission(false)
.setNSFW(false)
.addNumberOption((option) =>
option
.setName('percentage')