mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
feat: system commands are no longer restricted to bot owner id, and can be used in list of specified guilds
This commit is contained in:
1 parent
1d7d810421
commit
cf5151fcd7
4 files changed
+22
-27
No files matched your search
@@ -1,20 +1,13 @@
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const {
|
||||
embedColors,
|
||||
systemServerGuildId,
|
||||
botOwnerClientId
|
||||
} = require('../config.json');
|
||||
const { embedColors, systemServerGuildIds } = require('../config.json');
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('guilds')
|
||||
.setDescription('Show list of guilds where bot is added.'),
|
||||
run: async ({ interaction, client }) => {
|
||||
if (
|
||||
interaction.guildId !== systemServerGuildId ||
|
||||
interaction.user.id !== botOwnerClientId
|
||||
) {
|
||||
if (!systemServerGuildIds.includes(interaction.guildId)) {
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { useQueue } = require('discord-player');
|
||||
const {
|
||||
embedColors,
|
||||
systemServerGuildId,
|
||||
botOwnerClientId
|
||||
} = require('../config.json');
|
||||
const { embedColors, systemServerGuildIds } = require('../config.json');
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('status')
|
||||
.setDescription('Show bot status.'),
|
||||
run: async ({ interaction, client }) => {
|
||||
if (
|
||||
interaction.guildId !== systemServerGuildId ||
|
||||
interaction.user.id !== botOwnerClientId
|
||||
) {
|
||||
if (!systemServerGuildIds.includes(interaction.guildId)) {
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
|
||||
Reference in new issue
Block a user