mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 13:56:25 +02:00
Formatting
This commit is contained in:
+14
-12
@@ -3,14 +3,14 @@ const banlist = require('./banlist.json');
|
||||
const config = require('../../config.json');
|
||||
|
||||
module.exports = class ContactCommand extends commando.Command {
|
||||
constructor(Client){
|
||||
constructor(Client) {
|
||||
super(Client, {
|
||||
name: 'contact',
|
||||
aliases: [
|
||||
'suggest',
|
||||
'report',
|
||||
'bug'
|
||||
],
|
||||
aliases: [
|
||||
'suggest',
|
||||
'report',
|
||||
'bug'
|
||||
],
|
||||
group: 'botinfo',
|
||||
memberName: 'contact',
|
||||
description: 'Report bugs or request new features. (;contact Fix this command!)',
|
||||
@@ -19,21 +19,23 @@ module.exports = class ContactCommand extends commando.Command {
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
if(message.channel.type !== 'dm') {
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let banID = message.author.id;
|
||||
let messageToReport = message.content.split(" ").slice(1).join(" ");
|
||||
if (message.author.id === banlist.banned[banID]) {
|
||||
message.channel.send("Sorry, you've been banned from using this command.");
|
||||
} else {
|
||||
if(messageToReport === '') {
|
||||
}
|
||||
else {
|
||||
if (messageToReport === '') {
|
||||
message.channel.send(':x: Error! Please do not report nothing!');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
this.client.users.get(config.owner).send("**" + message.author.username + '#' + message.author.discriminator + " (" + message.author.id + ")" + ":**\n" + messageToReport);
|
||||
message.channel.send('Message Sent! Thanks for your support!');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user