dev test v 4
This commit is contained in:
4 files changed
+6
-6
No files matched your search
+3
-4
@@ -1,6 +1,5 @@
|
|||||||
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
|
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
|
||||||
const { addInventory } = require('../structures/inventory');
|
const { addUser } = require('../structures/user');
|
||||||
const { addBank } = require('../structures/bank');
|
|
||||||
const bitfieldCalculator = require('discord-bitfield-calculator');
|
const bitfieldCalculator = require('discord-bitfield-calculator');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -78,14 +77,14 @@ module.exports = {
|
|||||||
.setColor(client.config.Colors.Green)
|
.setColor(client.config.Colors.Green)
|
||||||
.setTitle('Successfully reset user\'s data')
|
.setTitle('Successfully reset user\'s data')
|
||||||
|
|
||||||
let banking = await client.dbo.collection("banks").findOne({"banking.userID": interaction.member.user.id}).then(banking => banking);
|
let banking = await client.dbo.collection("users").findOne({"user.userID": interaction.member.user.id}).then(banking => banking);
|
||||||
|
|
||||||
let bankingReset = false;
|
let bankingReset = false;
|
||||||
if (!banking) bankingReset = true
|
if (!banking) bankingReset = true
|
||||||
else banking = banking.banking
|
else banking = banking.banking
|
||||||
|
|
||||||
if (!bankingReset) {
|
if (!bankingReset) {
|
||||||
const success = addBank(banking.guilds, GuildDB.serverID, targetUserID, client, GuildDB.startingBalance);
|
const success = addUser(banking.guilds, GuildDB.serverID, targetUserID, client, GuildDB.startingBalance);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
client.error(err);
|
client.error(err);
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
|
|||||||
@@ -7,4 +7,5 @@ module.exports = async (client) => {
|
|||||||
client.log(`Successfully Logged in as ${client.user.tag}`);
|
client.log(`Successfully Logged in as ${client.user.tag}`);
|
||||||
client.log(`Ready to serve in ${client.channels.cache.size} channels on ${client.guilds.cache.size} servers, for a total of ${client.users.cache.size} users.`)
|
client.log(`Ready to serve in ${client.channels.cache.size} channels on ${client.guilds.cache.size} servers, for a total of ${client.users.cache.size} users.`)
|
||||||
client.RegisterSlashCommands();
|
client.RegisterSlashCommands();
|
||||||
|
client.logsUpdateTimer();
|
||||||
};
|
};
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayz-armbands",
|
"name": "dayz-armbands",
|
||||||
"version": "5.0.0.3",
|
"version": "5.0.0.4",
|
||||||
"description": "A General Purpose Discord Bot for DayZ Servers.",
|
"description": "A General Purpose Discord Bot for DayZ Servers.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class DayzArmbands extends Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
killfeed() {
|
killfeed() {
|
||||||
|
console.log('killfeed test')
|
||||||
}
|
}
|
||||||
|
|
||||||
async logsUpdateTimer() {
|
async logsUpdateTimer() {
|
||||||
|
|||||||
Reference in new issue
Block a user