mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Huge Modification to Code
This commit is contained in:
+12
-10
@@ -1,10 +1,15 @@
|
||||
const commando = require('discord.js-commando');
|
||||
const banlist = require('./banlist.json');
|
||||
|
||||
class ContactCommand extends commando.Command {
|
||||
module.exports = class ContactCommand extends commando.Command {
|
||||
constructor(Client){
|
||||
super(Client, {
|
||||
name: 'contact',
|
||||
name: 'contact',
|
||||
aliases: [
|
||||
'suggest',
|
||||
'report',
|
||||
'bug'
|
||||
],
|
||||
group: 'botinfo',
|
||||
memberName: 'contact',
|
||||
description: 'Report bugs or request new features. (;contact Fix this command!)',
|
||||
@@ -12,20 +17,17 @@ class ContactCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message, args) {
|
||||
async run(message) {
|
||||
if(message.channel.type !== 'dm') {
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let banid = message.author.id;
|
||||
if (message.author.id === banlist.banned[banid]) {
|
||||
let banID = message.author.id;
|
||||
if (message.author.id === banlist.banned[banID]) {
|
||||
message.channel.send("Sorry, you've been banned from using this command.");
|
||||
} else {
|
||||
this.client.users.get('242699360352206850').send("**" + message.author.username + '#' + message.author.discriminator + " (" + message.author.id + ")" + ":**\n" + message.content.split(" ").slice(1).join(" "));
|
||||
message.channel.send('Message Sent! Thanks for your support!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ContactCommand;
|
||||
};
|
||||
Reference in New Issue
Block a user