refactor/tidy command descriptions

This commit is contained in:
SowinskiBraeden committed 2024-01-27 15:01:45 -08:00
1 parent d805918454
commit 0a78c92d63
19 files changed
+68 -168

No files matched your search

+20 -20
View File
@@ -6,7 +6,7 @@ module.exports = {
name: "alarm", name: "alarm",
debug: false, debug: false,
global: false, global: false,
description: "Create a Zone Ping Alarm", description: "Manage an Alarm",
usage: "[command] [options]", usage: "[command] [options]",
permissions: { permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
@@ -37,7 +37,7 @@ module.exports = {
}, },
{ {
name: "radius", name: "radius",
description: "Radius of Zone Alarm", description: "Radius of Alarm",
value: "radius", value: "radius",
type: CommandOptions.Float, type: CommandOptions.Float,
min_value: 25.00, min_value: 25.00,
@@ -45,14 +45,14 @@ module.exports = {
}, },
{ {
name: "name", name: "name",
description: "Zone Alarm Name", description: "Alarm Name",
value: "name", value: "name",
type: CommandOptions.String, type: CommandOptions.String,
required: true, required: true,
}, },
{ {
name: "channel", name: "channel",
description: "The channel to configure", description: "Alarm Channel",
value: "channel", value: "channel",
type: CommandOptions.Channel, type: CommandOptions.Channel,
channel_types: [0], // Restrict to text channel channel_types: [0], // Restrict to text channel
@@ -60,7 +60,7 @@ module.exports = {
}, },
{ {
name: "role", name: "role",
description: "Role to Ping on Zone Alarm", description: "Role to Ping on Alarm",
value: "role", value: "role",
type: CommandOptions.Role, type: CommandOptions.Role,
required: true, required: true,
@@ -74,7 +74,7 @@ module.exports = {
}, },
{ {
name: "show-player-coords", name: "show-player-coords",
description: "Show a players coords when in the zone", description: "Show a players coords when in the radius of the Alarm?",
value: true, value: true,
type: CommandOptions.Boolean, type: CommandOptions.Boolean,
required: false, required: false,
@@ -83,18 +83,18 @@ module.exports = {
}, },
{ {
name: "delete", name: "delete",
description: "Delete a Zone Alarm", description: "Delete an Alarm",
value: "delete", value: "delete",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
}, },
{ {
name: "add-player", name: "add-player",
description: "Add Player to be Ignored in a Zone Alarm Pings", description: "Add player to be ignored list of an Alarm",
value: "add-player", value: "add-player",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
name: "gamertag", name: "gamertag",
description: "Gamertag of Player to Ignore", description: "Gamertag of player to ignore",
value: "gamertag", value: "gamertag",
type: CommandOptions.String, type: CommandOptions.String,
required: true, required: true,
@@ -102,12 +102,12 @@ module.exports = {
}, },
{ {
name: "remove-player", name: "remove-player",
description: "Remove a Player from being Ignored in a Zone Alarm Pings", description: "Remove a player from the ignored list of an Alarm",
value: "remove-player", value: "remove-player",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
name: "gamertag", name: "gamertag",
description: "Gamertag of Player to Ignore", description: "Gamertag of player to ignore",
value: "gamertag", value: "gamertag",
type: CommandOptions.String, type: CommandOptions.String,
required: true, required: true,
@@ -115,24 +115,24 @@ module.exports = {
}, },
{ {
name: "disable", name: "disable",
description: "Disable an Zone Alarm", description: "Disable an Alarm",
value: "disable", value: "disable",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
}, },
{ {
name: "enable", name: "enable",
description: "Enable an Zone Alarm", description: "Enable an Alarm",
value: "enable", value: "enable",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
}, },
{ {
name: "mute", name: "mute",
description: "Toggle mute on this alarm", description: "Mute the role ping of an Alarm",
value: "mute", value: "mute",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
name: "toggle", name: "toggle",
description: "Turn on or off role pings for this alarm", description: "Turn on/off role pings for this alarm",
value: false, value: false,
type: CommandOptions.Boolean, type: CommandOptions.Boolean,
required: true, required: true,
@@ -145,7 +145,7 @@ module.exports = {
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
name: "rule", name: "rule",
description: "Rule to Add to an Alarm", description: "Select a rule to add to an Alarm",
value: "rule", value: "rule",
type: CommandOptions.String, type: CommandOptions.String,
required: true, required: true,
@@ -158,7 +158,7 @@ module.exports = {
}, },
{ {
name: "remove-rule", name: "remove-rule",
description: "Remove a Rule from an Alarm", description: "Remove a rule from an Alarm",
value: "remove-rule", value: "remove-rule",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
}, },
@@ -177,12 +177,12 @@ module.exports = {
}, },
{ {
name: "move-origin", name: "move-origin",
description: "Move an alarms origin to new coordinates", description: "Move the origin of an Alarm",
value: "move-origin", value: "move-origin",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
name: "x-coord", name: "x-coord",
description: "X Coordinate of the origin", description: "X Coordinate of the new origin",
value: "x-coord", value: "x-coord",
type: CommandOptions.Float, type: CommandOptions.Float,
min_value: 0.01, min_value: 0.01,
@@ -190,7 +190,7 @@ module.exports = {
}, },
{ {
name: "y-coord", name: "y-coord",
description: "Y Coordinate of the origin", description: "Y Coordinate of the new origin",
value: "y-coord", value: "y-coord",
type: CommandOptions.Float, type: CommandOptions.Float,
min_value: 0.01, min_value: 0.01,
+1 -1
View File
@@ -5,7 +5,7 @@ module.exports = {
name: "armbands", name: "armbands",
debug: false, debug: false,
global: false, global: false,
description: "View a list of armbads", description: "View a list of armbads and what their image",
usage: "", usage: "",
permissions: { permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
+2 -2
View File
@@ -15,7 +15,7 @@ module.exports = {
options: [ options: [
{ {
name: "balance", name: "balance",
description: "View your bank balance and count your cash", description: "View your bank balance",
value: "balance", value: "balance",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
@@ -28,7 +28,7 @@ module.exports = {
}, },
{ {
name: "transfer", name: "transfer",
description: "Transfer directly to users bank", description: "Transfer money to another user",
value: "transfer", value: "transfer",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [ options: [
+2 -2
View File
@@ -33,14 +33,14 @@ module.exports = {
required: true required: true
}, { }, {
name: "anonymous", name: "anonymous",
description: "Make this bounty anonymous", description: "Make this bounty anonymous (does not show your name)",
value: false, value: false,
type: CommandOptions.Boolean, type: CommandOptions.Boolean,
required: false required: false
}] }]
}, { }, {
name: "pay", name: "pay",
description: "Pay off your bounty (double price)", description: "Pay off your bounty",
value: "pay", value: "pay",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
}, { }, {
+1 -1
View File
@@ -14,7 +14,7 @@ module.exports = {
}, },
options: [{ options: [{
name: "faction_role", name: "faction_role",
description: "Claim an armband for this faction role.", description: "Claim an armband for this faction role",
value: "faction_role", value: "faction_role",
type: CommandOptions.Role, type: CommandOptions.Role,
required: true, required: true,
+3 -3
View File
@@ -6,7 +6,7 @@ module.exports = {
name: "compare-rating", name: "compare-rating",
debug: false, debug: false,
global: false, global: false,
description: "Compare combat ratings", description: "Compare combat ratings between yourself and another player",
usage: "[user or gamertag]", usage: "[user or gamertag]",
permissions: { permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
@@ -14,13 +14,13 @@ module.exports = {
}, },
options: [{ options: [{
name: "discord", name: "discord",
description: "discord user to lookup stats", description: "Discord user to lookup stats",
value: "discord", value: "discord",
type: CommandOptions.User, type: CommandOptions.User,
required: false, required: false,
}, { }, {
name: "gamertag", name: "gamertag",
description: "gamertag to lookup stats", description: "Gamertag to lookup stats",
type: CommandOptions.String, type: CommandOptions.String,
required: false, required: false,
}], }],
+12 -11
View File
@@ -99,7 +99,7 @@ module.exports = {
}, },
{ {
name: "set_channel", name: "set_channel",
description: "Set one of the desired channels", description: "Configure a channel",
value: "set_channel", value: "set_channel",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options:[ options:[
@@ -126,7 +126,7 @@ module.exports = {
}, },
{ {
name: "linked_gt_role", name: "linked_gt_role",
description: "Access Role to give to users", description: "Role for users with linked gamertags",
value: "linked_gt_role", value: "linked_gt_role",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
@@ -139,7 +139,7 @@ module.exports = {
}, },
{ {
name: "member_role", name: "member_role",
description: "Role to give users when they join.", description: "Role for users who join the server",
value: "member_role", value: "member_role",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
@@ -158,7 +158,7 @@ module.exports = {
options: [ options: [
{ {
name: "action", name: "action",
description: "Add or remove a role from the exclude list.", description: "Set or remove a role to be a bot administrator",
value: "action", value: "action",
type: CommandOptions.String, type: CommandOptions.String,
choices: [ choices: [
@@ -177,7 +177,7 @@ module.exports = {
}, },
{ {
name: "admin_role", name: "admin_role",
description: "Discord Server's dedicated admin role", description: "Admin role to ping in admin logs channel",
value: "admin_role", value: "admin_role",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
@@ -190,7 +190,7 @@ module.exports = {
}, },
{ {
name: "exclude", name: "exclude",
description: "Exclude roles from users to use to claim a flag.", description: "Exclude roles that users can use to claim an armband",
value: "exclude", value: "exclude",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [ options: [
@@ -227,7 +227,7 @@ module.exports = {
}, },
{ {
name: "starting_balance", name: "starting_balance",
description: "Set the starting balance", description: "Set the starting balance of a new user",
value: "starting_balance", value: "starting_balance",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
@@ -235,7 +235,7 @@ module.exports = {
description: "The amount to set the starting balance", description: "The amount to set the starting balance",
value: "amount", value: "amount",
type: CommandOptions.Float, type: CommandOptions.Float,
min_value: 0.01, min_value: 1.00,
required: true, required: true,
}] }]
}, },
@@ -269,7 +269,7 @@ module.exports = {
}, },
{ {
name: "income_role", name: "income_role",
description: "Add/update a role to earn income on /collect-income command", description: "Set/remove roles to recieve income",
value: "set_income_role", value: "set_income_role",
type: CommandOptions.SubCommandGroup, type: CommandOptions.SubCommandGroup,
options: [ options: [
@@ -313,7 +313,7 @@ module.exports = {
}, },
{ {
name: "income_limiter", name: "income_limiter",
description: "Change the number of hours to wait before collecting income", description: "Change the number of hours to wait before collecting next income",
value: "income_limiter", value: "income_limiter",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
@@ -321,12 +321,13 @@ module.exports = {
description: "Number of hours till income can be collected", description: "Number of hours till income can be collected",
value: 168.00, // 1 week value: 168.00, // 1 week
type: CommandOptions.Float, type: CommandOptions.Float,
min_value: 1.00,
required: true, required: true,
}] }]
}, },
{ {
name: "combat-log-timer", name: "combat-log-timer",
description: "Adjust log timeout for combat prevention. (0 disables combat log)", description: "Adjust number of minutes to detect combat logs (0 disables combat log)",
value: "combat-log-timer", value: "combat-log-timer",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
-31
View File
@@ -16,11 +16,6 @@ module.exports = {
description: 'download the Nitrado logs and run checks now', description: 'download the Nitrado logs and run checks now',
value: 'sync-logs', value: 'sync-logs',
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
}, {
name: 'server-connection-stats',
description: 'view player connection stats',
value: 'server-connection-stats',
type: CommandOptions.SubCommand,
}], }],
SlashCommand: { SlashCommand: {
/** /**
@@ -38,32 +33,6 @@ module.exports = {
interaction.send({ content: 'Downloading and processing Nitrado logs now...', flags: (1 << 6) }); interaction.send({ content: 'Downloading and processing Nitrado logs now...', flags: (1 << 6) });
return client.logsUpdateTimer(client); return client.logsUpdateTimer(client);
} }
if (args[0].name == 'server-connection-stats') {
let statsEmbed = new EmbedBuilder()
.setColor(client.config.Colors.Default)
.setTitle(`Server connection stats`);
statsEmbed.addFields({ name: 'All time Unique connections', value: `> ${stats.length}`, inline: false });
let month3 = new Date().setMonth(new Date().getMonth() - 3);
let month3Players = await client.dbo.collection("players").find({"lastConnectDate": {$gt: month3}});
statsEmbed.addFields({ name: 'Unique connections in the last 3 months', value: `> ${month3Players.length}`, inline: false });
let month = new Date().setMonth(new Date().getMonth() - 1);
let monthlyPlayers = await client.dbo.collection("players").find({"lastConnectDate": {$gt: month}});
statsEmbed.addFields({ name: 'Unique connections in the last month', value: `> ${monthlyPlayers.length}`, inline: false });
let week = new Date(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)
let weeklyPlayers = await client.dbo.collection("players").find({"lastConnectDate": {$gt: week}});
statsEmbed.addFields({ name: 'Unique connections in the last week', value: `> ${weeklyPlayers.length}`, inline: false });
let today = new Date(new Date().getTime() - 1 * 24 * 60 * 60 * 1000)
let dailyPlayers = await client.dbo.collection("players").find({"lastConnectDate": {$gt: today}});
statsEmbed.addFields({ name: 'Unique connections in the last 24 hours', value: `> ${dailyPlayers.length}`, inline: false });
return interaction.send({ embeds: [statsEmbed] });
}
}, },
}, },
Interactions: {} Interactions: {}
+5 -5
View File
@@ -14,7 +14,7 @@ module.exports = {
}, },
options: [{ options: [{
name: "player-track", name: "player-track",
description: "track a player and announce location", description: "Track a player and announce location",
value: "player-track", value: "player-track",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
options: [{ options: [{
@@ -26,7 +26,7 @@ module.exports = {
}, },
{ {
name: "time", name: "time",
description: "duration of tracking", description: "Duration of tracking",
value: "time", value: "time",
type: CommandOptions.Integer, type: CommandOptions.Integer,
required: true, required: true,
@@ -37,14 +37,14 @@ module.exports = {
}, },
{ {
name: "event-name", name: "event-name",
description: "name of the event", description: "Name of the event",
value: "event-name", value: "event-name",
type: CommandOptions.String, type: CommandOptions.String,
required: true, required: true,
}, },
{ {
name: "channel", name: "channel",
description: "channel to host event", description: "Channel to post tracking data",
value: "channel", value: "channel",
type: CommandOptions.Channel, type: CommandOptions.Channel,
channel_types: [0], // Restrict to text channel channel_types: [0], // Restrict to text channel
@@ -58,7 +58,7 @@ module.exports = {
}] }]
}, { }, {
name: "delete", name: "delete",
description: "delete an active event", description: "Delete an active event",
value: "delete", value: "delete",
type: CommandOptions.SubCommand type: CommandOptions.SubCommand
}], }],
+10 -8
View File
@@ -27,13 +27,13 @@ module.exports = {
}, },
{ {
name: "support", name: "support",
description: "Get support for Applicatz", description: "Get support for Application",
value: "support", value: "support",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
}, },
{ {
name: "credits", name: "credits",
description: "DayZR Bot Credits", description: "DayZ.R Bot Credits",
value: "credits", value: "credits",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
}, },
@@ -111,9 +111,9 @@ module.exports = {
} else if (args[0].name == 'support') { } else if (args[0].name == 'support') {
const supportEmbed = new EmbedBuilder() const supportEmbed = new EmbedBuilder()
.setColor(client.config.Colors.Default) .setColor(client.config.Colors.Default)
.setDescription(`**__DayZR Bot Support__** .setDescription(`**__DayZ.R Bot Support__**
Are you experiencing troubles with the DayZR Bot? Are you experiencing troubles with the DayZ.R Bot?
Do you have questions or concerns? Do you have questions or concerns?
Do you require help to use the bot? Do you require help to use the bot?
Do you have a feature you'd like to see? Do you have a feature you'd like to see?
@@ -129,7 +129,8 @@ module.exports = {
.setColor(client.config.Colors.Default) .setColor(client.config.Colors.Default)
.setTitle('DayzRBot Credits') .setTitle('DayzRBot Credits')
.setDescription(` .setDescription(`
**Bot Author:** McDazzzled#5307 **Bot Author:** mcdazzzled
**Github:** https://github.com/SowinskiBraeden/dayz-reforger
${client.config.SupportServer} ${client.config.SupportServer}
`); `);
@@ -139,15 +140,16 @@ module.exports = {
const end = new Date().getTime(); const end = new Date().getTime();
const stats = new EmbedBuilder() const stats = new EmbedBuilder()
.setColor(client.config.Colors.Default) .setColor(client.config.Colors.Default)
.setTitle('DayzRBot Statistics') .setTitle('DayZ Reforger Bot Statistics')
.addFields( .addFields(
{ name: 'Guilds', value: `${client.guilds.cache.size}`, inline: true }, { name: 'Guilds', value: `${client.guilds.cache.size}`, inline: true },
{ name: 'Users', value: `${client.users.cache.size}`, inline: true }, { name: 'Users', value: `${client.users.cache.size}`, inline: true },
{ name: 'Latency', value: `${end - start}ms`, inline: true }, { name: 'Latency', value: `${end - start}ms`, inline: true },
{ name: 'Uptime', value: `${client.secondsToDhms(process.uptime().toFixed(2))}`, inline: true }, { name: 'Uptime', value: `${client.secondsToDhms(process.uptime().toFixed(2))}`, inline: true },
{ name: 'Bot Version', value: `${client.config.Dev} v${client.config.Version}`, inline: true }, { name: 'Bot Version', value: `${client.config.Dev} v${client.config.Version}`, inline: true },
{ name: 'Discord Version', value: 'Discord.js v^14.8.0', inline: true }, { name: 'Discord Version', value: `Discord.js ${package.dependencies["discord.js"]}`, inline: true },
) { name: 'MongoDB Version', value: `MongoDB ${package.dependencies.mongodb}`, inline: true},
);
return interaction.send({ embeds: [stats] }) return interaction.send({ embeds: [stats] })
} }
+2 -2
View File
@@ -5,7 +5,7 @@ module.exports = {
name: "leaderboard", name: "leaderboard",
debug: false, debug: false,
global: false, global: false,
description: "View server statistics leaderboard", description: "View server stats leaderboard",
usage: "[category] [limit]", usage: "[category] [limit]",
permissions: { permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
@@ -36,7 +36,7 @@ module.exports = {
] ]
}, { }, {
name: "limit", name: "limit",
description: "leaderboard limit", description: "Leaderboard limit",
value: "limit", value: "limit",
type: CommandOptions.Integer, type: CommandOptions.Integer,
min_value: 1, min_value: 1,
+1 -1
View File
@@ -5,7 +5,7 @@ module.exports = {
name: "lookup", name: "lookup",
debug: false, debug: false,
global: false, global: false,
description: "Search for a users discord or gamertag", description: "Search for a user's Discord or Gamertag",
usage: "[option] [parameter]", usage: "[option] [parameter]",
permissions: { permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-31
View File
@@ -1,31 +0,0 @@
const { EmbedBuilder } = require('discord.js');
module.exports = {
name: "ping",
debug: true,
global: true,
description: "Test bot activity",
usage: "",
permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
member: [],
},
options: [],
SlashCommand: {
/**
*
* @param {require("../structures/DayzRBot")} client
* @param {import("discord.js").Message} message
* @param {string[]} args
* @param {*} param3
*/
run: async (client, interaction, args, { GuildDB }, start) => {
const end = new Date().getTime();
const pingEmbed = new EmbedBuilder()
.setDescription(`🏓 **Pong!** Bot ping: ${end - start}ms`)
.setColor(client.config.Colors.Default);
return interaction.send({ embeds: [pingEmbed] });
},
},
}
+1 -1
View File
@@ -6,7 +6,7 @@ module.exports = {
name: "purchase-uav", name: "purchase-uav",
debug: false, debug: false,
global: false, global: false,
description: "Send a UAV to scout for 30 minutes. (500m range)", description: "Send a UAV to scout for 30 minutes (500m range)",
usage: "[x-coord] [y-coord]", usage: "[x-coord] [y-coord]",
permissions: { permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
+1 -1
View File
@@ -7,7 +7,7 @@ module.exports = {
name: "reset", name: "reset",
debug: false, debug: false,
global: false, global: false,
description: "Reset a users Banking data", description: "Reset a user's bank/money",
usage: "[user]", usage: "[user]",
permissions: { permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
+2 -2
View File
@@ -7,7 +7,7 @@ module.exports = {
name: "server", name: "server",
debug: false, debug: false,
global: false, global: false,
description: "DayZ Server Administrative Commands", description: "Nitrado DayZ Server Administrative Commands",
usage: "[command] [options]", usage: "[command] [options]",
permissions: { permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
@@ -46,7 +46,7 @@ module.exports = {
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
}, { }, {
name: "auto-restart", name: "auto-restart",
description: "Enable/Disable periodic server checks and restart if stopped.", description: "Enable/Disable periodic server checks and restart if stopped",
value: "auto-restart", value: "auto-restart",
type: CommandOptions.SubCommand, type: CommandOptions.SubCommand,
}, { }, {
-41
View File
@@ -1,41 +0,0 @@
const { EmbedBuilder } = require('discord.js');
const fs = require('fs');
module.exports = {
name: "stats",
debug: true,
global: true,
description: "check bot statistics",
usage: "",
permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
member: [],
},
options: [],
SlashCommand: {
/**
*
* @param {require("../structures/DayzRBot")} client
* @param {import("discord.js").Message} message
* @param {string[]} args
* @param {*} param3
*/
run: async (client, interaction, args, { GuildDB }, start) => {
const package = require('../package.json');
const end = new Date().getTime();
const stats = new EmbedBuilder()
.setColor(client.config.Colors.Default)
.setTitle('DayZ Reforger Bot Statistics')
.addFields(
{ name: 'Latency', value: `${end - start}ms`, inline: true },
{ name: 'Uptime', value: `${client.secondsToDhms(process.uptime().toFixed(2))}`, inline: true },
{ name: 'Bot Version', value: `${client.config.Dev} v${client.config.Version}`, inline: true },
{ name: 'Discord Version', value: `Discord.js ${package.dependencies["discord.js"]}`, inline: true },
{ name: 'MongoDB Version', value: `MongoDB ${package.dependencies.mongodb}`, inline: true},
)
return interaction.send({ embeds: [stats] })
},
},
}
+4 -4
View File
@@ -7,7 +7,7 @@ module.exports = {
name: "weapon-stats", name: "weapon-stats",
debug: false, debug: false,
global: false, global: false,
description: "Check player statistics", description: "Check player weapon statistics",
usage: "[category] [user or gamertag]", usage: "[category] [user or gamertag]",
permissions: { permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
@@ -15,7 +15,7 @@ module.exports = {
}, },
options: [{ options: [{
name: "category", name: "category",
description: "Weapon Category", description: "Weapon category",
value: "category", value: "category",
type: CommandOptions.String, type: CommandOptions.String,
required: true, required: true,
@@ -34,13 +34,13 @@ module.exports = {
] ]
}, { }, {
name: "discord", name: "discord",
description: "discord user to lookup stats", description: "Discord user to lookup stats",
value: "discord", value: "discord",
type: CommandOptions.User, type: CommandOptions.User,
required: false, required: false,
}, { }, {
name: "gamertag", name: "gamertag",
description: "gamertag to lookup stats", description: "Gamertag to lookup stats",
type: CommandOptions.String, type: CommandOptions.String,
required: false, required: false,
}], }],
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "dayzr-bot", "name": "dayzr-bot",
"version": "12.5.12", "version": "12.5.13",
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.", "description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
"main": "index.js", "main": "index.js",
"nodemonConfig": { "nodemonConfig": {