debug and combat log detection
This commit is contained in:
8 files changed
+125
-13
No files matched your search
+1
-1
@@ -135,7 +135,7 @@ module.exports = {
|
||||
if (err) return client.sendInternalError(interaction, err);
|
||||
});
|
||||
|
||||
} else banking = banking.banking;
|
||||
} else banking = banking.user;
|
||||
|
||||
if (!client.exists(banking.guilds[GuildDB.serverID])) {
|
||||
const success = addUser(banking.guilds, GuildDB.serverID, interaction.member.user.id, client, GuildDB.startingBalance);
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ module.exports = {
|
||||
if (err) return client.sendInternalError(interaction, err);
|
||||
});
|
||||
|
||||
} else banking = banking.banking;
|
||||
} else banking = banking.user;
|
||||
|
||||
if (!client.exists(banking.guilds[GuildDB.serverID])) {
|
||||
const success = addUser(banking.guilds, GuildDB.serverID, interaction.member.user.id, client, GuildDB.startingBalance);
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
const { EmbedBuilder, } = require('discord.js');
|
||||
const { Inventory, addInventory } = require('../structures/inventory');
|
||||
const { Bank, addBank } = require('../structures/bank');
|
||||
|
||||
module.exports = {
|
||||
name: "collect-income",
|
||||
debug: false,
|
||||
global: false,
|
||||
description: "Collect Your Income",
|
||||
usage: "",
|
||||
permissions: {
|
||||
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
|
||||
member: [],
|
||||
},
|
||||
options: [],
|
||||
SlashCommand: {
|
||||
/**
|
||||
*
|
||||
* @param {require("../structures/QuarksBot")} client
|
||||
* @param {import("discord.js").Message} 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({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
const hasIncomeRole = GuildDB.incomeRoles.some(data => {
|
||||
if (interaction.member.roles.includes(data.role)) return true;
|
||||
return false;
|
||||
});
|
||||
|
||||
if (!hasIncomeRole) {
|
||||
const error = new EmbedBuilder()
|
||||
.setColor(client.config.Colors.Red)
|
||||
.setTitle('No Income!')
|
||||
.setDescription(`It appears you don't have any roles to earn income.`)
|
||||
|
||||
return interaction.send({ embeds: [error] })
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
}
|
||||
+2
-2
@@ -94,8 +94,8 @@ module.exports = {
|
||||
|
||||
// Register inventory for user
|
||||
let newBank = new User();
|
||||
newBank.createBank(targetUserID, GuildDB.serverID, GuildDB.startingBalance, 0);
|
||||
newBank.save().catch(err => {
|
||||
await newBank.createUser(targetUserID, GuildDB.serverID, GuildDB.startingBalance, 0);
|
||||
await newBank.save().catch(err => {
|
||||
if (err) return client.sendInternalError(interaction, err);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
name: "stats",
|
||||
debug: true,
|
||||
global: true,
|
||||
description: "check bot statistics",
|
||||
name: "player-list",
|
||||
debug: false,
|
||||
global: false,
|
||||
description: "get current online players",
|
||||
usage: "",
|
||||
permissions: {
|
||||
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ module.exports = {
|
||||
|
||||
let bankingReset = false;
|
||||
if (!banking) bankingReset = true
|
||||
else banking = banking.banking
|
||||
else banking = banking.user
|
||||
|
||||
if (!bankingReset) {
|
||||
const success = addUser(banking.guilds, GuildDB.serverID, targetUserID, client, GuildDB.startingBalance);
|
||||
|
||||
Reference in new issue
Block a user