mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 22:32:52 +02:00
ALIASES
This commit is contained in:
@@ -24,9 +24,10 @@ module.exports = class AkinatorCommand extends Command {
|
|||||||
const data = ans === null ? await this.createSession(msg.channel) : await this.progress(msg.channel, ans);
|
const data = ans === null ? await this.createSession(msg.channel) : await this.progress(msg.channel, ans);
|
||||||
if (this.sessions.get(msg.channel.id).step >= 80) break;
|
if (this.sessions.get(msg.channel.id).step >= 80) break;
|
||||||
const answers = data.answers.map(answer => answer.answer.toLowerCase());
|
const answers = data.answers.map(answer => answer.answer.toLowerCase());
|
||||||
|
answers.push('end');
|
||||||
await msg.say(stripIndents`
|
await msg.say(stripIndents`
|
||||||
**${++data.step}.** ${data.question}
|
**${++data.step}.** ${data.question}
|
||||||
${data.answers.map(answer => answer.answer).join(' | ')}
|
${data.answers.map(answer => answer.answer).join(' | ')} | End
|
||||||
`);
|
`);
|
||||||
const filter = res => res.author.id === msg.author.id && answers.includes(res.content.toLowerCase());
|
const filter = res => res.author.id === msg.author.id && answers.includes(res.content.toLowerCase());
|
||||||
const msgs = await msg.channel.awaitMessages(filter, {
|
const msgs = await msg.channel.awaitMessages(filter, {
|
||||||
@@ -37,6 +38,7 @@ module.exports = class AkinatorCommand extends Command {
|
|||||||
await msg.say('Sorry, time is up!');
|
await msg.say('Sorry, time is up!');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (msgs.first().content.toLowerCase() === 'end') break;
|
||||||
ans = answers.indexOf(msgs.first().content.toLowerCase());
|
ans = answers.indexOf(msgs.first().content.toLowerCase());
|
||||||
}
|
}
|
||||||
const guess = await this.finish(msg.channel);
|
const guess = await this.finish(msg.channel);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ module.exports = class DefineCommand extends Command {
|
|||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
name: 'word-of-the-day',
|
name: 'word-of-the-day',
|
||||||
|
aliases: ['wordnik-word-of-the-day'],
|
||||||
group: 'random',
|
group: 'random',
|
||||||
memberName: 'word-of-the-day',
|
memberName: 'word-of-the-day',
|
||||||
description: 'Gets the word of the day.',
|
description: 'Gets the word of the day.',
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ module.exports = class BulbapediaCommand extends Command {
|
|||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
name: 'bulbapedia',
|
name: 'bulbapedia',
|
||||||
aliases: ['bulbagarden', 'bulbapedia-article'],
|
aliases: ['bulbagarden', 'bulbapedia-article', 'bulbagarden-article'],
|
||||||
group: 'search',
|
group: 'search',
|
||||||
memberName: 'bulbapedia',
|
memberName: 'bulbapedia',
|
||||||
description: 'Searches Bulbapedia for your query.',
|
description: 'Searches Bulbapedia for your query.',
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ module.exports = class DiscrimCommand extends Command {
|
|||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
name: 'discrim',
|
name: 'discrim',
|
||||||
aliases: ['discriminator', 'search-discrim'],
|
aliases: ['discriminator', 'search-discrim', 'search-discriminator'],
|
||||||
group: 'search',
|
group: 'search',
|
||||||
memberName: 'discrim',
|
memberName: 'discrim',
|
||||||
description: 'Searches for other users with a certain discriminator.',
|
description: 'Searches for other users with a certain discriminator.',
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "42.12.1",
|
"version": "42.12.2",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Shard.js",
|
"main": "Shard.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user