This commit is contained in:
Daniel Odendahl Jr
2018-01-15 02:58:22 +00:00
parent decc79ada6
commit 5b7f587d1e
3 changed files with 34 additions and 2 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ module.exports = class HangmanCommand extends Command {
this.playing = new Set();
}
async run(msg) {
async run(msg) { // eslint-disable-line complexity
if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.');
this.playing.add(msg.channel.id);
try {
+32
View File
@@ -0,0 +1,32 @@
const { Command } = require('discord.js-commando');
module.exports = class LatlmesCommand extends Command {
constructor(client) {
super(client, {
name: 'latlmes',
group: 'text-edit',
memberName: 'latlmes',
description: 'Creates a Latlmes fake link that redirects to a rickroll.',
args: [
{
key: 'section',
prompt: 'What section of the news should the link display?',
type: 'string',
max: 100,
parse: query => encodeURIComponent(query.replace(/ /g, '-').toLowerCase())
},
{
key: 'query',
prompt: 'What would you like the link to display as?',
type: 'string',
max: 1000,
parse: query => encodeURIComponent(query.replace(/ /g, '-').toLowerCase())
}
]
});
}
run(msg, { section, query }) {
return msg.say(`http://www.latlmes.com/${section}/${query}-1`);
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "61.2.0",
"version": "61.3.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {