Added eslintrc config and updated all files to it
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
const { SlashCommandBuilder, PermissionFlagsBits, userMention, EmbedBuilder, ChannelType } = require('discord.js');
|
||||
const { SlashCommandBuilder, PermissionFlagsBits, userMention, EmbedBuilder, ChannelType } = require("discord.js")
|
||||
|
||||
module.exports = {
|
||||
name: 'admin',
|
||||
description: 'Admin command.',
|
||||
type: 'slash',
|
||||
name: "admin",
|
||||
description: "Admin command.",
|
||||
type: "slash",
|
||||
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('devel')
|
||||
.setDescription('Admin command.')
|
||||
.setName("devel")
|
||||
.setDescription("Admin command.")
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName('reload')
|
||||
.setDescription('Reload the bot.'))
|
||||
.setName("reload")
|
||||
.setDescription("Reload the bot."))
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName('listallverified')
|
||||
.setDescription('List all verified users.'))
|
||||
.setName("listallverified")
|
||||
.setDescription("List all verified users."))
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName('purgereactions')
|
||||
.setDescription('Purge all reactions from a messages.')
|
||||
.setName("purgereactions")
|
||||
.setDescription("Purge all reactions from a messages.")
|
||||
.addIntegerOption(option =>
|
||||
option
|
||||
.setName('count')
|
||||
.setDescription('Count of messages to purge reactions from.')))
|
||||
.setName("count")
|
||||
.setDescription("Count of messages to purge reactions from.")))
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
@@ -31,19 +31,19 @@ module.exports = {
|
||||
|
||||
async execute(interaction) {
|
||||
|
||||
const subcommand = interaction.options.getSubcommand();
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
|
||||
if (subcommand === 'reload') {
|
||||
if (subcommand === "reload") {
|
||||
|
||||
const { exec } = require('child_process');
|
||||
await interaction.reply({ content: 'Reloading...', ephemeral: true })
|
||||
const { exec } = require("child_process")
|
||||
await interaction.reply({ content: "Reloading...", ephemeral: true })
|
||||
|
||||
exec('pm2 restart 0', async (err, stdout, stderr) => {
|
||||
exec("pm2 restart 0", async (err, stdout, stderr) => {
|
||||
if (err) {
|
||||
await interaction.reply({ content: 'Error while reloading: ' + err, ephemeral: true })
|
||||
await interaction.reply({ content: "Error while reloading: " + err, ephemeral: true })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user