mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Latlmes
This commit is contained in:
@@ -15,7 +15,7 @@ module.exports = class HangmanCommand extends Command {
|
|||||||
this.playing = new Set();
|
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.');
|
if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.');
|
||||||
this.playing.add(msg.channel.id);
|
this.playing.add(msg.channel.id);
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -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
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "61.2.0",
|
"version": "61.3.0",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user