added prompt

merge-requests/3/head
loicbersier 5 years ago
parent 32b2b7ca07
commit e5d04529e4

@ -9,7 +9,10 @@ class autoresponseCommand extends Command {
args: [
{
id: 'text',
type: 'string'
type: 'string',
prompt: {
start: 'Do you want to **enable** or **disable** auto response?',
}
},
{
id: 'all',

@ -8,11 +8,18 @@ class BanCommand extends Command {
args: [
{
id: 'member',
type: 'member'
type: 'member',
prompt: {
start: 'Wich member do you want to ban?',
}
},
{
id: 'reasons',
type: 'string',
prompt: {
start: 'For what reasons?',
optional: true
},
match: 'rest'
}
],

@ -12,6 +12,9 @@ class byeCommand extends Command {
{
id: 'message',
type: 'string',
prompt: {
start: 'What message should the bot say when a user leave?',
},
match: 'rest'
}
],

@ -8,11 +8,18 @@ class KickCommand extends Command {
args: [
{
id: 'member',
type: 'member'
type: 'member',
prompt: {
start: 'Wich member do you want to ban?',
}
},
{
id: 'reasons',
type: 'string',
prompt: {
start: 'For what reasons?',
optional: true
},
match: 'rest'
}
],

@ -8,6 +8,9 @@ class PruneCommand extends Command {
args: [
{
id: 'amount',
prompt: {
start: 'How many message should i delete?',
},
type: 'integer'
}
],

@ -12,12 +12,25 @@ class shameboardCommand extends Command {
{
id: 'emote',
type: 'string',
prompt: {
start: 'What emote should be used to enter the shameboard?',
optional: true
},
default: '✡'
},
{
id: 'count',
prompt: {
start: 'How many times should that emote be reacted to enter the shameboard?',
optional: true
},
type: 'integer',
default: '4'
},
{
id: 'remove',
match: 'flag',
flag: '--remove'
}
],
description: {
@ -29,15 +42,22 @@ class shameboardCommand extends Command {
}
async exec(message, args) {
let shameboardChannel = message.channel.id;
if (!args.remove) {
let shameboardChannel = message.channel.id;
fs.writeFile(`./board/shame${message.guild.id}.json`, `{"shameboard": "${shameboardChannel}" , "emote": "${args.emote}", "count": "${args.count}"}`, function (err) {
if (err) {
console.log(err);
}
});
return message.channel.send(`This channel have been set as the shameboard with ${args.emote} with the minium of ${args.count}`);
fs.writeFile(`./board/shame${message.guild.id}.json`, `{"shameboard": "${shameboardChannel}" , "emote": "${args.emote}", "count": "${args.count}"}`, function (err) {
if (err) {
console.log(err);
}
});
return message.channel.send(`This channel have been set as the shameboard with ${args.emote} with the minium of ${args.count}`);
} else {
fs.unlink(`./board/shame${message.guild.id}.json`, function (err) {
if (err) return message.channel.send('There is no shameboard');
return message.channel.send('Deleted the shameboard');
});
}
}
}

@ -3,17 +3,23 @@ const { Command } = require('discord-akairo');
class SlowmodeCommand extends Command {
constructor() {
super('Slowmode', {
aliases: ['slowmode', 'slow'],
aliases: ['slowmode', 'slow', 'cooldown'],
category: 'admin',
args: [
{
id: 'slowmodeNumber',
prompt: {
start: 'what do you want the delay to be between each message?',
},
type: 'integer'
},
{
id: 'realtime',
prompt: {
start: 'For how long should the slowmode last?',
optional: true
},
type: 'integer',
optional: true,
}
],
clientPermissions: ['MANAGE_CHANNELS'],

@ -12,12 +12,25 @@ class StarBoardCommand extends Command {
{
id: 'emote',
type: 'string',
prompt: {
start: 'What emote should be used to enter the shameboard?',
optional: true
},
default: '🌟'
},
{
id: 'count',
type: 'integer',
prompt: {
start: 'How many times should that emote be reacted to enter the shameboard?',
optional: true
},
default: '4'
},
{
id: 'remove',
match: 'flag',
flag: '--remove'
}
],
description: {
@ -29,15 +42,22 @@ class StarBoardCommand extends Command {
}
async exec(message, args) {
let starboardChannel = message.channel.id;
if (!args.remove) {
let starboardChannel = message.channel.id;
fs.writeFile(`./board/star${message.guild.id}.json`, `{"starboard": "${starboardChannel}", "emote": "${args.emote}", "count": "${args.count}"}`, function (err) {
if (err) {
console.log(err);
}
});
return message.channel.send(`This channel have been set as the starboard with ${args.emote} with the minium of ${args.count}`);
fs.writeFile(`./board/star${message.guild.id}.json`, `{"starboard": "${starboardChannel}", "emote": "${args.emote}", "count": "${args.count}"}`, function (err) {
if (err) {
console.log(err);
}
});
return message.channel.send(`This channel have been set as the starboard with ${args.emote} with the minium of ${args.count}`);
} else {
fs.unlink(`./board/star${message.guild.id}.json`, function (err) {
if (err) return message.channel.send('There is no shameboard');
return message.channel.send('Deleted the starboard');
});
}
}
}

@ -11,12 +11,18 @@ class TagCommand extends Command {
args: [
{
id: 'trigger',
type: 'string'
type: 'string',
prompt: {
start: 'What word or sentence should trigger it?',
}
},
{
id: 'response',
type: 'string',
match: 'rest'
match: 'rest',
prompt: {
start: 'What word or sentence should the response be?',
}
}
],
channelRestriction: 'guild',

@ -8,7 +8,10 @@ class UnbanCommand extends Command {
args: [
{
id: 'member',
type: 'user'
type: 'member',
prompt: {
start: 'Wich member do you want to unban?',
}
}
],
clientPermissions: ['BAN_MEMBERS'],

@ -12,7 +12,10 @@ class UnTagCommand extends Command {
{
id: 'trigger',
type: 'string',
match: 'rest'
match: 'rest',
prompt: {
start: 'wich tag do you want to remove?',
}
}
],
channelRestriction: 'guild',

@ -12,7 +12,10 @@ class welcomeCommand extends Command {
{
id: 'message',
type: 'string',
match: 'rest'
match: 'rest',
prompt: {
start: 'What message do you want to welcome peoples?',
}
}
],
description: {

@ -11,6 +11,10 @@ class RedditCommand extends Command {
{
id: 'sub',
type: 'string',
prompt: {
start: 'What subreddit do you want to browse?',
optional: true
},
default: 'random',
match: 'rest'
}

@ -10,7 +10,10 @@ class spbCommand extends Command {
args: [
{
id: 'link',
type: 'string'
type: 'string',
prompt: {
start: 'Need a shitpostbot5000 template link!',
}
}
],
description: {

@ -12,6 +12,9 @@ class dectalkCommand extends Command {
{
id: 'decMessage',
type: 'string',
prompt: {
start: 'Write something so i can say it back in dectalk',
},
match: 'rest'
}
],

@ -12,6 +12,9 @@ class dectalkvcCommand extends Command {
{
id: 'decMessage',
type: 'string',
prompt: {
start: 'Write something so i can say it back in dectalk',
},
match: 'rest'
}
],

@ -12,6 +12,9 @@ class samCommand extends Command {
{
id: 'samMessage',
type: 'string',
prompt: {
start: 'Write something so i can say it back in sam',
},
match: 'rest'
}
],

@ -12,6 +12,9 @@ class samvcCommand extends Command {
{
id: 'samMessage',
type: 'string',
prompt: {
start: 'Write something so i can say it back in sam',
},
match: 'rest'
}
],

@ -13,6 +13,9 @@ class TtsCommand extends Command {
{
id: 'text',
type: 'string',
prompt: {
start: 'Write something so i can say it back in Google tts',
},
match: 'rest'
}
],

@ -14,6 +14,9 @@ class TtsvcCommand extends Command {
{
id: 'text',
type: 'string',
prompt: {
start: 'Write something so i can say it back in Google tts',
},
match: 'rest'
}
],

@ -9,6 +9,9 @@ class ClapCommand extends Command {
{
id: 'text',
type: 'string',
prompt: {
start: 'Write something so i can replace the space with 👏',
},
match: 'rest'
}
],

@ -11,6 +11,9 @@ class EmotesayCommand extends Command {
{
id: 'text',
type: 'string',
prompt: {
start: 'Write something so i can replace the space with dancing emote',
},
match: 'rest'
}
],

@ -11,6 +11,9 @@ class SayCommand extends Command {
{
id: 'text',
type: 'string',
prompt: {
start: 'Write something so i can say it back',
},
match: 'rest'
}
],

@ -11,6 +11,9 @@ class SaydCommand extends Command {
{
id: 'text',
type: 'string',
prompt: {
start: 'Write something so i can say it back',
},
match: 'rest'
}
],

@ -9,6 +9,9 @@ class spoilerCommand extends Command {
{
id: 'text',
type: 'string',
prompt: {
start: 'Write something so i can say it back in spoiler',
},
match: 'rest'
}
],

@ -18,6 +18,9 @@ class tweetCommand extends Command {
{
id: 'text',
type: 'string',
prompt: {
start: 'Write something to tweet',
},
match: 'rest'
}
],

@ -13,11 +13,14 @@ class DownloadCommand extends Command {
{
id: 'link',
type: 'string',
default: 'https://www.youtube.com/watch?v=6n3pFFPSlW4'
prompt: {
start: 'Send the link of wich video you want to download',
}
},
{
id: 'alt',
type: 'bool',
match: 'flag',
flag: '--alt'
}
],
clientPermissions: ['ATTACH_FILES'],

@ -13,11 +13,14 @@ class DownloadspoilerCommand extends Command {
{
id: 'link',
type: 'string',
default: 'https://www.youtube.com/watch?v=6n3pFFPSlW4'
prompt: {
start: 'Send the link of wich video you want to download',
}
},
{
id: 'alt',
type: 'bool',
match: 'flag',
flag: '--alt'
}
],
clientPermissions: ['ATTACH_FILES'],
@ -36,7 +39,7 @@ class DownloadspoilerCommand extends Command {
if (link.includes('http') || link.includes('www')) {
if (args.alt) {
console.log('alt download!');
fs.unlink('./SPOILER_SPOILER_video.mp4', (err) => {
fs.unlink('./SPOILER_video.mp4', (err) => {
if (err);
});
return youtubedl.exec(args.link, ['-o', './SPOILER_video.mp4'], {}, function(err, output) {

@ -11,6 +11,9 @@ class FeedbackCommand extends Command {
{
id: 'text',
type: 'string',
prompt: {
start: 'What do you want to say to the owner?',
},
match: 'rest'
}
],

@ -9,8 +9,8 @@ class InviteCommand extends Command {
args: [
{
id: 'here',
type: 'string',
optional: true
match: 'flag',
flag: '--here'
}
],
description: {
@ -23,7 +23,7 @@ class InviteCommand extends Command {
async exec(message, args) {
let invMessage = `You can add me from here: https://discordapp.com/oauth2/authorize?client_id=${this.client.user.id}&scope=bot&permissions=0\nYou can also join my support server over here: ${supportServer} come and say hi :)`;
if (args.here == 'here') {
if (args.here) {
message.channel.send(invMessage);
} else {
message.channel.send('Check your dm');

@ -16,6 +16,9 @@ class musicCommand extends Command {
{
id: 'music',
type: 'string',
prompt: {
start: 'Send the link of wich video you want to know song',
},
match: 'rest'
}
],

@ -10,6 +10,9 @@ class playCommand extends Command {
{
id: 'ytblink',
type: 'string',
prompt: {
start: 'Send the link of wich video you want to play',
},
match: 'rest',
}
],

@ -13,6 +13,7 @@ class TranslationCommand extends Command {
id: 'language',
type: ['az','ml','sq','mt','am','mk','en','mi','ar','mr','hy','mhr','af','mn','eu','de','ba','ne','be','no','bn','pa','my','pap','bg','fa','bs','pl','cy','pt','hu','ro','vi','ru','ht','ceb','gl','sr','nl','si','mrj','sk','el','sl','ka','sw','gu','su','da','tg','he','th','yi','tl','id','ta','ga','tt','it','te','is','tr','es','udm','kk','uz','kn','uk','ca','ur','ky','fi','zh','fr','ko','hi','xh','hr','km','cs','lo','sv','la','gd','lv','et','lt','eo','lb','jv','mg','ja','ms'],
prompt: {
start: 'In what language do you want to translate it to',
retry: 'That\'s not a valid language! try again.'
},
default: 'en'

@ -14,6 +14,15 @@ class hahaYesClient extends AkairoClient {
this.commandHandler = new CommandHandler(this, {
directory: './commands/',
prefix: prefix,
argumentDefaults: {
prompt: {
timeout: 'Time ran out, command has been cancelled.',
ended: 'Too many retries, command has been cancelled.',
cancel: 'Command has been cancelled.',
retries: 4,
time: 30000
}
},
commandUtil: true,
commandUtilLifetime: 60000,
allowMention: true,

Loading…
Cancel
Save