forked from Supositware/Haha-Yes
added --remove and default messages
parent
5ca6515616
commit
8441ad09df
@ -1,31 +0,0 @@
|
|||||||
const { Command } = require('discord-akairo');
|
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
class unbyeCommand extends Command {
|
|
||||||
constructor() {
|
|
||||||
super('unbye', {
|
|
||||||
aliases: ['unbye'],
|
|
||||||
category: 'admin',
|
|
||||||
channelRestriction: 'guild',
|
|
||||||
userPermissions: ['MANAGE_CHANNELS'],
|
|
||||||
description: {
|
|
||||||
content: 'Delete leaving message',
|
|
||||||
usage: '[]',
|
|
||||||
examples: ['']
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async exec(message) {
|
|
||||||
fs.unlink(`./bye/${message.guild.id}.json`, (err) => {
|
|
||||||
if (err) {
|
|
||||||
console.error(err);
|
|
||||||
return message.channel.send('An error has occured, there is most likely no bye/leave message set!');
|
|
||||||
} else {
|
|
||||||
return message.channel.send('Disabled bye/leave message');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = unbyeCommand;
|
|
@ -1,31 +0,0 @@
|
|||||||
const { Command } = require('discord-akairo');
|
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
class unwelcomeCommand extends Command {
|
|
||||||
constructor() {
|
|
||||||
super('unwelcome', {
|
|
||||||
aliases: ['unwelcome'],
|
|
||||||
category: 'admin',
|
|
||||||
channelRestriction: 'guild',
|
|
||||||
userPermissions: ['MANAGE_CHANNELS'],
|
|
||||||
description: {
|
|
||||||
content: 'Delete welcome message',
|
|
||||||
usage: '[]',
|
|
||||||
examples: ['']
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async exec(message) {
|
|
||||||
fs.unlink(`./welcome/${message.guild.id}.json`, (err) => {
|
|
||||||
if (err) {
|
|
||||||
console.error(err);
|
|
||||||
return message.channel.send('An error has occured, there is most likely no welcome message set!');
|
|
||||||
} else {
|
|
||||||
return message.channel.send('Disabled unwelcome message');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = unwelcomeCommand;
|
|
Loading…
Reference in New Issue