2019-08-12 08:48:14 +02:00
|
|
|
const { Command } = require('discord-akairo');
|
|
|
|
|
|
|
|
class fakejoinCommand extends Command {
|
|
|
|
constructor() {
|
|
|
|
super('fakejoin', {
|
|
|
|
aliases: ['fakejoin'],
|
|
|
|
category: 'admin',
|
|
|
|
channelRestriction: 'guild',
|
2019-11-22 20:56:54 +01:00
|
|
|
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
|
2019-08-12 08:48:14 +02:00
|
|
|
args: [
|
|
|
|
{
|
2019-12-16 17:34:57 +01:00
|
|
|
id: 'user',
|
|
|
|
type: 'user',
|
2019-08-12 08:48:14 +02:00
|
|
|
match: 'rest'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
description: {
|
|
|
|
content: 'Fake join message',
|
|
|
|
usage: '[text]',
|
|
|
|
examples: ['Supositware']
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
async exec(message, args) {
|
2019-12-16 17:34:57 +01:00
|
|
|
let member;
|
|
|
|
|
|
|
|
if (args.user)
|
|
|
|
member = message.guild.members.get(args.user.id);
|
|
|
|
else
|
|
|
|
member = message.guild.members.get(message.author.id);
|
2019-08-12 08:48:14 +02:00
|
|
|
|
2019-12-16 17:34:57 +01:00
|
|
|
this.client.emit('guildMemberAdd', member);
|
2019-08-12 08:48:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = fakejoinCommand;
|