fix: Make commands inaccessible in direct messages

This commit is contained in:
Marius Begby committed 2023-07-13 15:42:07 +02:00
1 parent 3c85841b87
commit a4e7931dae
12 files changed
+19 -7

No files matched your search

+2 -1
View File
@@ -16,7 +16,8 @@ const {
module.exports = {
data: new SlashCommandBuilder()
.setName('filters')
.setDescription('Toggle various audio filters during playback.'),
.setDescription('Toggle various audio filters during playback.')
.setDMPermission(false),
run: async ({ interaction }) => {
if (!interaction.member.voice.channel) {
return await interaction.editReply({
+2 -1
View File
@@ -5,7 +5,8 @@ const { embedColors } = require('../config.json');
module.exports = {
data: new SlashCommandBuilder()
.setName('help')
.setDescription('Show a list of commands and their usage.'),
.setDescription('Show a list of commands and their usage.')
.setDMPermission(false),
run: async ({ interaction }) => {
return await interaction.editReply({
embeds: [
+2 -1
View File
@@ -8,7 +8,8 @@ module.exports = {
.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
run: async ({ interaction }) => {
+2 -1
View File
@@ -6,7 +6,8 @@ const { embedColors, progressBarOptions } = require('../config.json');
module.exports = {
data: new SlashCommandBuilder()
.setName('nowplaying')
.setDescription('Show information about the track currently playing.'),
.setDescription('Show information about the track currently playing.')
.setDMPermission(false),
run: async ({ interaction }) => {
if (!interaction.member.voice.channel) {
return await interaction.editReply({
+2 -1
View File
@@ -6,7 +6,8 @@ const { embedColors } = require('../config.json');
module.exports = {
data: new SlashCommandBuilder()
.setName('pause')
.setDescription('Pause or resume the current track.'),
.setDescription('Pause or resume the current track.')
.setDMPermission(false),
run: async ({ interaction }) => {
if (!interaction.member.voice.channel) {
return await interaction.editReply({
+1
View File
@@ -9,6 +9,7 @@ module.exports = {
.setDescription(
'Add a track or playlist to the queue by searching or url.'
)
.setDMPermission(false)
.addStringOption((option) =>
option
.setName('query')
+1
View File
@@ -7,6 +7,7 @@ module.exports = {
data: new SlashCommandBuilder()
.setName('queue')
.setDescription('Show the list of tracks added to the queue.')
.setDMPermission(false)
.addNumberOption((option) =>
option
.setName('page')
+1
View File
@@ -7,6 +7,7 @@ module.exports = {
data: new SlashCommandBuilder()
.setName('remove')
.setDescription('Remove a specific track from the queue.')
.setDMPermission(false)
.addNumberOption((option) =>
option
.setName('tracknumber')
+1
View File
@@ -7,6 +7,7 @@ module.exports = {
data: new SlashCommandBuilder()
.setName('skip')
.setDescription('Skip the current track.')
.setDMPermission(false)
.addNumberOption((option) =>
option
.setName('tracknumber')
+1
View File
@@ -7,6 +7,7 @@ module.exports = {
data: new SlashCommandBuilder()
.setName('volume')
.setDescription('Show or set the playback volume for tracks.')
.setDMPermission(false)
.addNumberOption((option) =>
option
.setName('percentage')
+2 -1
View File
@@ -5,7 +5,8 @@ const { embedColors, systemServerGuildIds } = require('../config.json');
module.exports = {
data: new SlashCommandBuilder()
.setName('guilds')
.setDescription('Show list of guilds where bot is added.'),
.setDescription('Show list of guilds where bot is added.')
.setDMPermission(false),
run: async ({ interaction, client }) => {
if (!systemServerGuildIds.includes(interaction.guildId)) {
return await interaction.editReply({
+2 -1
View File
@@ -8,7 +8,8 @@ const packageJson = require('../package.json');
module.exports = {
data: new SlashCommandBuilder()
.setName('status')
.setDescription('Show bot status.'),
.setDescription('Show bot status.')
.setDMPermission(false),
run: async ({ interaction, client }) => {
if (!systemServerGuildIds.includes(interaction.guildId)) {
return await interaction.editReply({