Disabled reload command
This commit is contained in:
@@ -59,23 +59,8 @@ module.exports = {
|
|||||||
|
|
||||||
if (subcommand === 'reload') {
|
if (subcommand === 'reload') {
|
||||||
|
|
||||||
await interaction.deferReply({ ephemeral: true })
|
await interaction.reply({ content: 'In development', ephemeral: true })
|
||||||
|
return
|
||||||
const spawn = require('child_process').spawn;
|
|
||||||
|
|
||||||
if (user.id !== dev) {
|
|
||||||
await interaction.editReply({ content: 'Due to you not screwing something up this command is restricted to only ' + userMentioned, ephemeral: true })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const child = spawn('pm restart 0', {})
|
|
||||||
|
|
||||||
if (child.stderr) {
|
|
||||||
await interaction.editReply({ content: 'Error restarting bot.', ephemeral: true })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
await interaction.editReply({ content: 'Restarting bot...', ephemeral: true })
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user