debug management
This commit is contained in:
22 files changed
+100
-24
No files matched your search
@@ -1,7 +1,8 @@
|
|||||||
const { MessageEmbed } = require('discord.js');
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "add-monet",
|
name: "add-money",
|
||||||
|
debug: false,
|
||||||
description: "change the starting balance for the server",
|
description: "change the starting balance for the server",
|
||||||
usage: "[user] [amount]",
|
usage: "[user] [amount]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ const { MessageEmbed, Guild } = require('discord.js');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "bal",
|
name: "bal",
|
||||||
|
debug: false,
|
||||||
description: "View balance",
|
description: "View balance",
|
||||||
usage: "[user]",
|
usage: "[user]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ const { MessageEmbed } = require('discord.js');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "deposit",
|
name: "deposit",
|
||||||
|
debug: false,
|
||||||
description: "deposit cash to your balance",
|
description: "deposit cash to your balance",
|
||||||
usage: "[amount]",
|
usage: "[amount]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ const Inventory = require('../structures/inventory');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "give",
|
name: "give",
|
||||||
|
debug: false,
|
||||||
description: "give user an amount of cash",
|
description: "give user an amount of cash",
|
||||||
usage: "[amount]",
|
usage: "[amount]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
+4
-1
@@ -2,6 +2,7 @@ const { MessageEmbed } = require("discord.js");
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "help",
|
name: "help",
|
||||||
|
debug: false,
|
||||||
description: "Get information on a specific command",
|
description: "Get information on a specific command",
|
||||||
usage: "[command]",
|
usage: "[command]",
|
||||||
permissions: {
|
permissions: {
|
||||||
@@ -30,7 +31,9 @@ module.exports = {
|
|||||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||||
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||||
}
|
}
|
||||||
let Commands = client.commands.map((cmd) =>
|
let Commands = client.commands.filter((cmd) => {
|
||||||
|
return !cmd.debug
|
||||||
|
}).map((cmd) =>
|
||||||
`\`/${cmd.name}${cmd.usage ? " " + cmd.usage : ""}\` - ${cmd.description}`
|
`\`/${cmd.name}${cmd.usage ? " " + cmd.usage : ""}\` - ${cmd.description}`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ const { MessageEmbed } = require('discord.js');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "id-set",
|
name: "id-set",
|
||||||
|
debug: false,
|
||||||
description: "set a value on your wallet ID",
|
description: "set a value on your wallet ID",
|
||||||
usage: "[firstname/lastname/dob] [value]",
|
usage: "[firstname/lastname/dob] [value]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ const action = ['pick up', 'grab', 'get', 'aquire', 'obtain', 'gain', 'take poss
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "inventory-add",
|
name: "inventory-add",
|
||||||
|
debug: false,
|
||||||
description: "add item to inventory",
|
description: "add item to inventory",
|
||||||
usage: "[item]",
|
usage: "[item]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ const action = ['ditch', 'drop', 'forget', 'throw out', 'leave', 'set down', 'le
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "inventory",
|
name: "inventory",
|
||||||
|
debug: false,
|
||||||
description: "Manage your inventory",
|
description: "Manage your inventory",
|
||||||
usage: "[command]",
|
usage: "[command]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ const { MessageEmbed } = require('discord.js');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "me",
|
name: "me",
|
||||||
|
debug: false,
|
||||||
description: "Send a message stating your characters action",
|
description: "Send a message stating your characters action",
|
||||||
usage: "[action]",
|
usage: "[action]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ const { MessageEmbed } = require('discord.js');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "ping",
|
name: "ping",
|
||||||
|
debug: true,
|
||||||
description: "Test bot activity",
|
description: "Test bot activity",
|
||||||
usage: "",
|
usage: "",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ const { MessageEmbed, MessageActionRow, MessageButton } = require('discord.js');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "remove-channel",
|
name: "remove-channel",
|
||||||
|
debug: false,
|
||||||
description: "Remove channel",
|
description: "Remove channel",
|
||||||
usage: "[channel type]",
|
usage: "[channel type]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ const { MessageEmbed, Guild } = require('discord.js');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "remove-income",
|
name: "remove-income",
|
||||||
|
debug: false,
|
||||||
description: "remove an income role",
|
description: "remove an income role",
|
||||||
usage: "[role] [amount daily]",
|
usage: "[role] [amount daily]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ const Inventory = require('../structures/inventory');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "search",
|
name: "search",
|
||||||
|
debug: false,
|
||||||
description: "Search a users inventory",
|
description: "Search a users inventory",
|
||||||
usage: "[user]",
|
usage: "[user]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ const { MessageEmbed } = require('discord.js');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "set-channel",
|
name: "set-channel",
|
||||||
|
debug: false,
|
||||||
description: "set a channel",
|
description: "set a channel",
|
||||||
usage: "[channel type] [channel]",
|
usage: "[channel type] [channel]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ const { MessageEmbed, Guild } = require('discord.js');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "set-income",
|
name: "set-income",
|
||||||
|
debug: false,
|
||||||
description: "set a role to recieve income when working",
|
description: "set a role to recieve income when working",
|
||||||
usage: "[role] [amount daily]",
|
usage: "[role] [amount daily]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ const { MessageEmbed } = require('discord.js');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "set-starting-balance",
|
name: "set-starting-balance",
|
||||||
|
debug: false,
|
||||||
description: "change the starting balance for the server",
|
description: "change the starting balance for the server",
|
||||||
usage: "[amount]",
|
usage: "[amount]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: "stats",
|
||||||
|
debug: true,
|
||||||
|
description: "check bot statistics",
|
||||||
|
usage: "",
|
||||||
|
permissions: {
|
||||||
|
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
|
||||||
|
member: [],
|
||||||
|
},
|
||||||
|
SlashCommand: {
|
||||||
|
options: [],
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {require("../structures/QuarksBot")} client
|
||||||
|
* @param {import("discord.js").MessageCreate} message
|
||||||
|
* @param {string[]} args
|
||||||
|
* @param {*} param3
|
||||||
|
*/
|
||||||
|
run: async (client, interaction, args, { GuildDB }) => {
|
||||||
|
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||||
|
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = `
|
||||||
|
\`\`\`
|
||||||
|
*******************************
|
||||||
|
* Channels *${client.padding(client.channels.cache.size)}*
|
||||||
|
*******************************
|
||||||
|
* Servers *${client.padding(client.guilds.cache.size)}*
|
||||||
|
*******************************
|
||||||
|
* Users *${client.padding(client.users.cache.size)}
|
||||||
|
* *****************************
|
||||||
|
\`\`\`
|
||||||
|
`
|
||||||
|
|
||||||
|
const stats = new MessageEmbed()
|
||||||
|
.setColor(client.config.EmbedColor)
|
||||||
|
.setTitle('Statistics')
|
||||||
|
.setDescription(data)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ const { MessageEmbed } = require('discord.js');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "tweet",
|
name: "tweet",
|
||||||
|
debug: false,
|
||||||
description: "Tweet your thoughts to the local twitter page",
|
description: "Tweet your thoughts to the local twitter page",
|
||||||
usage: "[message]",
|
usage: "[message]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ const inventory = require('./inventory');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "withdraw",
|
name: "withdraw",
|
||||||
|
debug: false,
|
||||||
description: "withdraw cash from balance",
|
description: "withdraw cash from balance",
|
||||||
usage: "[amount]",
|
usage: "[amount]",
|
||||||
permissions: {
|
permissions: {
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: "work",
|
||||||
|
debug: false,
|
||||||
|
description: "work to earn your income",
|
||||||
|
usage: "",
|
||||||
|
permissions: {
|
||||||
|
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
|
||||||
|
member: [],
|
||||||
|
},
|
||||||
|
SlashCommand: {
|
||||||
|
options: [],
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {require("../structures/QuarksBot")} client
|
||||||
|
* @param {import("discord.js").MessageCreate} message
|
||||||
|
* @param {string[]} args
|
||||||
|
* @param {*} param3
|
||||||
|
*/
|
||||||
|
run: async (client, interaction, args, { GuildDB }) => {
|
||||||
|
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||||
|
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(interaction.member)
|
||||||
|
return interaction.send('Debugging...')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
+2
-22
@@ -31,26 +31,6 @@ module.exports = async (client, message) => {
|
|||||||
client.commands.find((x) => x.aliases && x.aliases.includes(command));
|
client.commands.find((x) => x.aliases && x.aliases.includes(command));
|
||||||
|
|
||||||
//Executing the codes when we get the command or aliases
|
//Executing the codes when we get the command or aliases
|
||||||
if (cmd) {
|
if (cmd) cmd.run(client, message, args, { GuildDB });
|
||||||
if (
|
else return;
|
||||||
(cmd.permissions &&
|
|
||||||
cmd.permissions.channel &&
|
|
||||||
!message.channel
|
|
||||||
.permissionsFor(client.user)
|
|
||||||
.has(cmd.permissions.channel)) ||
|
|
||||||
(cmd.permissions &&
|
|
||||||
cmd.permissions.member &&
|
|
||||||
!message.channel
|
|
||||||
.permissionsFor(message.member)
|
|
||||||
.has(cmd.permissions.member))
|
|
||||||
)
|
|
||||||
return client.sendError(
|
|
||||||
message.channel,
|
|
||||||
"Missing Permissions!" + GuildDB.DJ
|
|
||||||
? " You need the correct role to access this command."
|
|
||||||
: ""
|
|
||||||
);
|
|
||||||
cmd.run(client, message, args, { GuildDB });
|
|
||||||
client.CommandsRan++;
|
|
||||||
} else return;
|
|
||||||
};
|
};
|
||||||
@@ -72,6 +72,8 @@ class QuarksBot extends Client {
|
|||||||
|
|
||||||
exists(n) {return null != n && undefined != n && "" != n}
|
exists(n) {return null != n && undefined != n && "" != n}
|
||||||
|
|
||||||
|
padding(data) {return (` ${data}` + " ".repeat((9-data.toString().length)))}
|
||||||
|
|
||||||
LoadCommands() {
|
LoadCommands() {
|
||||||
let CommandsDir = path.join(__dirname, '..', 'commands');
|
let CommandsDir = path.join(__dirname, '..', 'commands');
|
||||||
fs.readdir(CommandsDir, (err, files) => {
|
fs.readdir(CommandsDir, (err, files) => {
|
||||||
|
|||||||
Reference in new issue
Block a user