mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 10:25:11 +02:00
Huge Modification to Code
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
const commando = require('discord.js-commando');
|
||||
|
||||
class QuantumCoin extends commando.Command {
|
||||
module.exports = class QuantumCoin extends commando.Command {
|
||||
constructor(Client){
|
||||
super(Client, {
|
||||
name: 'quantumcoin',
|
||||
name: 'quantumcoin',
|
||||
aliases: [
|
||||
'oddcoin',
|
||||
'brokencoin'
|
||||
],
|
||||
group: 'response',
|
||||
memberName: 'quantumcoin',
|
||||
description: 'Flips a coin that lands on nothing. (;quantumcoin)',
|
||||
@@ -11,16 +15,13 @@ class QuantumCoin 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 qcoin = ['on nothing', 'on NaN', 'on 0', 'in the air', 'on null'];
|
||||
qcoin = qcoin[Math.floor(Math.random() * qcoin.length)];
|
||||
message.channel.send("It landed " + qcoin);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = QuantumCoin;
|
||||
};
|
||||
Reference in New Issue
Block a user