Actually make bot owner able to delete any command
This commit is contained in:
parent
b872e88f85
commit
7710d53e71
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ module.exports = function(customName, author, owners){
|
||||||
let index = 0;
|
let index = 0;
|
||||||
customCommands.forEach(function (customCommand) {
|
customCommands.forEach(function (customCommand) {
|
||||||
if (customCommand.customName === customName) {
|
if (customCommand.customName === customName) {
|
||||||
if(customCommand.author === author || owners.indexOf(author.toString()) != -1 ){
|
if(customCommand.author === author || owners.indexOf(author) != -1 ){
|
||||||
customCommands.splice(index, 1)
|
customCommands.splice(index, 1)
|
||||||
sendText = `The custom command "${customName}" has been deleted.`
|
sendText = `The custom command "${customName}" has been deleted.`
|
||||||
fs.writeFileSync(customPath, JSON.stringify(customCommands, null, 4))
|
fs.writeFileSync(customPath, JSON.stringify(customCommands, null, 4))
|
||||||
|
|
Loading…
Add table
Reference in a new issue