finishing touches
This commit is contained in:
parent
f7fd3b99a4
commit
00d3ea2999
10 changed files with 196 additions and 3 deletions
28
DiscordModules/Developers/exec.js
Normal file
28
DiscordModules/Developers/exec.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
const Command = require('../../src/structures/Command');
|
||||
const exec = require('shell-exec');
|
||||
module.exports = class Exec extends Command {
|
||||
constructor() {
|
||||
super({
|
||||
name: 'exec',
|
||||
description: 'Execute shell commands',
|
||||
aliases: [ 'ex' ],
|
||||
module: 'Developers',
|
||||
cooldown: 1,
|
||||
guildOnly: false,
|
||||
developerOnly: true,
|
||||
nsfw: false
|
||||
});
|
||||
}
|
||||
|
||||
async command(ctx) {
|
||||
const trying = await ctx.send('Attempting to execute ' + ctx.utils.format.bold(ctx.args.join(' ')));
|
||||
|
||||
await exec(ctx.args.join(' '))
|
||||
.then((r) => {
|
||||
trying.edit('```bash\n' + r.stdout + '```');
|
||||
})
|
||||
.catch((error) => {
|
||||
trying.edit('Failed to execute ' + ctx.utils.format.bold(ctx.args.join(' ')));
|
||||
});
|
||||
}
|
||||
};
|
48
DiscordModules/General/bug.js
Normal file
48
DiscordModules/General/bug.js
Normal file
|
@ -0,0 +1,48 @@
|
|||
const Command = require('../../src/structures/Command');
|
||||
const D = require('discord.js');
|
||||
module.exports = class Bug extends Command {
|
||||
constructor() {
|
||||
super({
|
||||
name: 'bug',
|
||||
description: 'Report a Bug in the bot',
|
||||
aliases: [ 'report', 'bugreport' ],
|
||||
module: 'General',
|
||||
cooldown: 10,
|
||||
guildOnly: false,
|
||||
developerOnly: false,
|
||||
nsfw: false
|
||||
});
|
||||
}
|
||||
|
||||
async command(ctx) {
|
||||
/* throw new Error('Testing'); */
|
||||
let abuse = new D.MessageEmbed()
|
||||
.setTitle('Misuse of Command')
|
||||
.setDescription(
|
||||
`Please make sure to make your Suggestion as Detailed as possible.\n\nAbuse of this command will lead to complete denial of command usage.`
|
||||
);
|
||||
if (ctx.args.length < 1) {
|
||||
return m.channel.send(abuse);
|
||||
}
|
||||
|
||||
ctx.trello
|
||||
.addCard(
|
||||
ctx.args.join(' '),
|
||||
`
|
||||
Author: ${ctx.author.tag} (${ctx.author.id})
|
||||
Server: ${ctx.guild.name} (${ctx.guild.id})`,
|
||||
ctx.config.trello.boards.bugs
|
||||
)
|
||||
.then((r) => {
|
||||
ctx.trello.addLabelToCard(r.id, ctx.config.trello.labels.bugs).catch(console.error);
|
||||
let reply = new D.MessageEmbed()
|
||||
.setTitle('Report Received')
|
||||
.setColor(ctx.config.color)
|
||||
.setDescription(ctx.args.join(' '))
|
||||
.addField('URL', r.url, true)
|
||||
.setThumbnail(ctx.client.user.avatarURL());
|
||||
|
||||
ctx.send(reply);
|
||||
});
|
||||
}
|
||||
};
|
48
DiscordModules/General/suggest.js
Normal file
48
DiscordModules/General/suggest.js
Normal file
|
@ -0,0 +1,48 @@
|
|||
const Command = require('../../src/structures/Command');
|
||||
const D = require('discord.js');
|
||||
module.exports = class Suggest extends Command {
|
||||
constructor() {
|
||||
super({
|
||||
name: 'suggest',
|
||||
description: 'Suggest something for the Bot',
|
||||
aliases: [ 'sug', 'suggestion' ],
|
||||
module: 'General',
|
||||
cooldown: 10,
|
||||
guildOnly: false,
|
||||
developerOnly: false,
|
||||
nsfw: false
|
||||
});
|
||||
}
|
||||
|
||||
async command(ctx) {
|
||||
/* throw new Error('Testing'); */
|
||||
let abuse = new D.MessageEmbed()
|
||||
.setTitle('Misuse of Command')
|
||||
.setDescription(
|
||||
`Please make sure to make your Suggestion as Detailed as possible.\n\nAbuse of this command will lead to complete denial of command usage.`
|
||||
);
|
||||
if (ctx.args.length < 1) {
|
||||
return m.channel.send(abuse);
|
||||
}
|
||||
|
||||
ctx.trello
|
||||
.addCard(
|
||||
ctx.args.join(' '),
|
||||
`
|
||||
Author: ${ctx.author.tag} (${ctx.author.id})
|
||||
Server: ${ctx.guild.name} (${ctx.guild.id})`,
|
||||
ctx.config.trello.boards.suggestions
|
||||
)
|
||||
.then((r) => {
|
||||
ctx.trello.addLabelToCard(r.id, ctx.config.trello.labels.suggestions).catch(console.error);
|
||||
let reply = new D.MessageEmbed()
|
||||
.setTitle('Suggestion Received')
|
||||
.setColor(ctx.config.color)
|
||||
.setDescription(ctx.args.join(' '))
|
||||
.addField('URL', r.url, true)
|
||||
.setThumbnail(ctx.client.user.avatarURL());
|
||||
|
||||
ctx.send(reply);
|
||||
});
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue