mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Word of the Day, TONS of new aliases
This commit is contained in:
@@ -7,6 +7,7 @@ module.exports = class ChallengerCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'challenger',
|
||||
aliases: ['challenger-approaching'],
|
||||
group: 'avatar-edit',
|
||||
memberName: 'challenger',
|
||||
description: 'Draws a user\'s avatar over Super Smash Bros.\'s "Challenger Approaching" screen.',
|
||||
|
||||
@@ -10,6 +10,7 @@ module.exports = class SteamCardCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'steam-card',
|
||||
aliases: ['valve-card'],
|
||||
group: 'avatar-edit',
|
||||
memberName: 'steam-card',
|
||||
description: 'Draws a user\'s avatar over a Steam Trading Card.',
|
||||
|
||||
@@ -20,9 +20,8 @@ module.exports = class HangmanCommand extends Command {
|
||||
this.playing.add(msg.channel.id);
|
||||
try {
|
||||
const { body } = await snekfetch
|
||||
.get('http://api.wordnik.com:80/v4/words.json/randomWord')
|
||||
.get('http://api.wordnik.com/v4/words.json/randomWord')
|
||||
.query({
|
||||
hasDictionaryDef: true,
|
||||
minCorpusCount: 0,
|
||||
maxCorpusCount: -1,
|
||||
minDictionaryCount: 1,
|
||||
|
||||
@@ -4,6 +4,7 @@ module.exports = class EmojiCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'emoji',
|
||||
aliases: ['emojis', 'emoji-list'],
|
||||
group: 'guild-info',
|
||||
memberName: 'emoji',
|
||||
description: 'Responds with a list of the server\'s custom emoji.',
|
||||
|
||||
@@ -5,6 +5,7 @@ module.exports = class AchievementCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'achievement',
|
||||
aliaes: ['minecraft-achievement'],
|
||||
group: 'image-edit',
|
||||
memberName: 'achievement',
|
||||
description: 'Sends a Minecraft achievement with the text of your choice.',
|
||||
|
||||
@@ -4,6 +4,7 @@ module.exports = class ClearChannelCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'clear-channel',
|
||||
aliases: ['prune-all'],
|
||||
group: 'moderation',
|
||||
memberName: 'clear-channel',
|
||||
description: 'Deletes all messages in a channel by cloning it and then deleting it.',
|
||||
|
||||
@@ -7,6 +7,7 @@ module.exports = class CurrencyCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'currency',
|
||||
aliases: ['currency-convert', 'convert-currency'],
|
||||
group: 'num-edit',
|
||||
memberName: 'currency',
|
||||
description: 'Converts a number from one currency to another.',
|
||||
|
||||
@@ -5,6 +5,7 @@ module.exports = class MathCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'math',
|
||||
aliases: ['calculator', 'calculate'],
|
||||
group: 'num-edit',
|
||||
memberName: 'math',
|
||||
description: 'Calculates math expressions.',
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class TemperatureCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'temperature',
|
||||
aliases: ['temperature-convert', 'convert-temperature', 'temp-convert', 'convert-temp'],
|
||||
group: 'num-edit',
|
||||
memberName: 'temperature',
|
||||
description: `Converts temperatures to/from ${list(units, 'or')}.`,
|
||||
|
||||
@@ -5,7 +5,7 @@ module.exports = class CatCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'cat',
|
||||
aliases: ['neko'],
|
||||
aliases: ['neko', 'kitty'],
|
||||
group: 'random-img',
|
||||
memberName: 'cat',
|
||||
description: 'Responds with a random cat image.',
|
||||
|
||||
@@ -5,6 +5,7 @@ module.exports = class DogCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'dog',
|
||||
aliases: ['puppy'],
|
||||
group: 'random-img',
|
||||
memberName: 'dog',
|
||||
description: 'Responds with a random dog image.',
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class MagicBallCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: '8-ball',
|
||||
aliases: ['magic-8-ball', 'eight-ball', 'magic-eight-ball'],
|
||||
group: 'random-res',
|
||||
memberName: '8-ball',
|
||||
description: 'Asks your question to the Magic 8 Ball.',
|
||||
|
||||
@@ -5,7 +5,7 @@ module.exports = class CatFactCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'cat-fact',
|
||||
aliases: ['neko-fact'],
|
||||
aliases: ['neko-fact', 'kitty-fact'],
|
||||
group: 'random-res',
|
||||
memberName: 'cat-fact',
|
||||
description: 'Responds with a cat fact.'
|
||||
|
||||
@@ -4,6 +4,7 @@ module.exports = class ChooseCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'choose',
|
||||
aliases: ['pick'],
|
||||
group: 'random-res',
|
||||
memberName: 'choose',
|
||||
description: 'Chooses between options you provide.',
|
||||
|
||||
@@ -5,6 +5,7 @@ module.exports = class DogFactCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'dog-fact',
|
||||
aliases: ['puppy-fact'],
|
||||
group: 'random-res',
|
||||
memberName: 'dog-fact',
|
||||
description: 'Responds with a dog fact.'
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = class HistoryCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'history',
|
||||
aliases: ['event', 'today'],
|
||||
aliases: ['event', 'today', 'today-in-history'],
|
||||
group: 'random-res',
|
||||
memberName: 'history',
|
||||
description: 'Responds with an event that occurred today in history, or on a specific day.',
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class MagicConchCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'magic-conch',
|
||||
aliases: ['magic-conch-shell'],
|
||||
group: 'random-res',
|
||||
memberName: 'magic-conch',
|
||||
description: 'Asks your question to the Magic Conch.',
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = class NewYorkTimesCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'new-york-times',
|
||||
aliases: ['ny-times'],
|
||||
aliases: ['ny-times', 'new-york-times-article', 'ny-times-article'],
|
||||
group: 'random-res',
|
||||
memberName: 'new-york-times',
|
||||
description: 'Responds with an article from the New York Times.',
|
||||
|
||||
@@ -5,6 +5,7 @@ module.exports = class OffspringCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'offspring',
|
||||
aliases: ['sex'],
|
||||
group: 'random-res',
|
||||
memberName: 'offspring',
|
||||
description: 'Decides if your new child will be a boy or a girl.'
|
||||
|
||||
@@ -5,6 +5,7 @@ module.exports = class SecurityKeyCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'security-key',
|
||||
aliases: ['crypto', 'crypto-key'],
|
||||
group: 'random-res',
|
||||
memberName: 'security-key',
|
||||
description: 'Generates a random security key.'
|
||||
|
||||
@@ -5,6 +5,7 @@ module.exports = class GenderCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'gender',
|
||||
aliases: ['gender-guess', 'guess-gender'],
|
||||
group: 'random',
|
||||
memberName: 'gender',
|
||||
description: 'Determines the gender of name.',
|
||||
|
||||
@@ -4,6 +4,7 @@ module.exports = class LMGTFYCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'lmgtfy',
|
||||
aliases: ['let-me-google-that-for-you', 'google'],
|
||||
group: 'random',
|
||||
memberName: 'lmgtfy',
|
||||
description: 'Creates a LMGTFY link with the query you provide.',
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = class ShortenURLCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'shorten-url',
|
||||
aliases: ['short-url', 'url-shorten'],
|
||||
aliases: ['short-url', 'url-shorten', 'url-short'],
|
||||
group: 'random',
|
||||
memberName: 'shorten-url',
|
||||
description: 'Creates a goo.gl short URL from another URL.',
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { WORDNIK_KEY } = process.env;
|
||||
|
||||
module.exports = class DefineCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'word-of-the-day',
|
||||
group: 'search',
|
||||
memberName: 'word-of-the-day',
|
||||
description: 'Gets the word of the day.',
|
||||
clientPermissions: ['EMBED_LINKS']
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
try {
|
||||
const { body } = await snekfetch
|
||||
.get('http://api.wordnik.com/v4/words.json/wordOfTheDay')
|
||||
.query({ api_key: WORDNIK_KEY });
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x9797FF)
|
||||
.setTitle(body.word)
|
||||
.setDescription(`(${body.definitions[0].partOfSpeech}) ${body.definitions[0].text}`);
|
||||
return msg.embed(embed);
|
||||
} catch (err) {
|
||||
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -7,7 +7,7 @@ module.exports = class BulbapediaCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'bulbapedia',
|
||||
aliases: ['bulbagarden'],
|
||||
aliases: ['bulbagarden', 'bulbapedia-article'],
|
||||
group: 'search',
|
||||
memberName: 'bulbapedia',
|
||||
description: 'Searches Bulbapedia for your query.',
|
||||
|
||||
@@ -7,6 +7,7 @@ module.exports = class DefineCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'define',
|
||||
aliases: ['dictionary', 'wordnik'],
|
||||
group: 'search',
|
||||
memberName: 'define',
|
||||
description: 'Defines a word.',
|
||||
@@ -25,11 +26,10 @@ module.exports = class DefineCommand extends Command {
|
||||
async run(msg, { query }) {
|
||||
try {
|
||||
const { body } = await snekfetch
|
||||
.get(`http://api.wordnik.com:80/v4/word.json/${query}/definitions`)
|
||||
.get(`http://api.wordnik.com/v4/word.json/${query}/definitions`)
|
||||
.query({
|
||||
limit: 1,
|
||||
includeRelated: false,
|
||||
useCanonical: false,
|
||||
api_key: WORDNIK_KEY
|
||||
});
|
||||
if (!body.length) return msg.say('Could not find any results.');
|
||||
@@ -37,7 +37,7 @@ module.exports = class DefineCommand extends Command {
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x9797FF)
|
||||
.setTitle(data.word)
|
||||
.setDescription(data.text);
|
||||
.setDescription(`(${data.partOfSpeech}) ${data.text}`);
|
||||
return msg.embed(embed);
|
||||
} catch (err) {
|
||||
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class FlickrCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'flickr',
|
||||
aliases: ['flickr-image'],
|
||||
group: 'search',
|
||||
memberName: 'flickr',
|
||||
description: 'Searches Flickr for your query.',
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = class GhibliCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'ghibli',
|
||||
aliases: ['studio-ghibli'],
|
||||
aliases: ['studio-ghibli', 'ghibli-film', 'studio-ghibli-film'],
|
||||
group: 'search',
|
||||
memberName: 'ghibli',
|
||||
description: 'Searches Studio Ghibli films for your query.',
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class GiphyCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'giphy',
|
||||
aliases: ['gif', 'giphy-gif'],
|
||||
group: 'search',
|
||||
memberName: 'giphy',
|
||||
description: 'Searches Giphy for your query.',
|
||||
|
||||
@@ -7,6 +7,7 @@ module.exports = class GitHubCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'github',
|
||||
aliases: ['github-repository', 'github-repo'],
|
||||
group: 'search',
|
||||
memberName: 'github',
|
||||
description: 'Searches GitHub for information on a repository.',
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class IPInfoCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'ip-info',
|
||||
aliases: ['ip'],
|
||||
group: 'search',
|
||||
memberName: 'ip-info',
|
||||
description: 'Gets data for an IP address.',
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class KickstarterCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'kickstarter',
|
||||
aliases: ['kickstarter-project'],
|
||||
group: 'search',
|
||||
memberName: 'kickstarter',
|
||||
description: 'Searches Kickstarter for your query.',
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class MapCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'map',
|
||||
aliases: ['google-maps'],
|
||||
group: 'search',
|
||||
memberName: 'map',
|
||||
description: 'Responds with a map based upon your query.',
|
||||
|
||||
@@ -5,6 +5,7 @@ module.exports = class NeopetCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'neopet',
|
||||
aliases: ['neopet-image', 'neopet-image-finder'],
|
||||
group: 'search',
|
||||
memberName: 'neopet',
|
||||
description: 'Searches for Neopets with the username of your query.',
|
||||
|
||||
@@ -7,6 +7,7 @@ module.exports = class NPMCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'npm',
|
||||
aliases: ['npm-package'],
|
||||
group: 'search',
|
||||
memberName: 'npm',
|
||||
description: 'Searches NPM for info on an NPM package.',
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class RecipeCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'recipe',
|
||||
aliases: ['recipe-puppy'],
|
||||
group: 'search',
|
||||
memberName: 'recipe',
|
||||
description: 'Searches for recipes that include your query.',
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class RedditCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'reddit',
|
||||
aliases: ['subreddit'],
|
||||
group: 'search',
|
||||
memberName: 'reddit',
|
||||
description: 'Gets a random recent post from a subreddit.',
|
||||
|
||||
@@ -7,6 +7,7 @@ module.exports = class SafebooruCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'safebooru',
|
||||
aliases: ['safebooru-image'],
|
||||
group: 'search',
|
||||
memberName: 'safebooru',
|
||||
description: 'Searches Safebooru for your query.',
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class SteamCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'steam',
|
||||
aliases: ['steam-game'],
|
||||
group: 'search',
|
||||
memberName: 'steam',
|
||||
description: 'Searches Steam for your query.',
|
||||
|
||||
@@ -7,6 +7,7 @@ module.exports = class UrbanCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'urban',
|
||||
aliases: ['urban-dictionary', 'urban-define', 'define-urban'],
|
||||
group: 'search',
|
||||
memberName: 'urban',
|
||||
description: 'Searches Urban Dictionary for your query.',
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = class VocaloidCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'vocaloid',
|
||||
aliases: ['vocadb'],
|
||||
aliases: ['vocadb', 'vocaloid-song', 'vocaloid-music'],
|
||||
group: 'search',
|
||||
memberName: 'vocaloid',
|
||||
description: 'Searches VocaDB for your query.',
|
||||
|
||||
@@ -8,6 +8,7 @@ module.exports = class WattpadCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'wattpad',
|
||||
aliases: ['wattpad-book'],
|
||||
group: 'search',
|
||||
memberName: 'wattpad',
|
||||
description: 'Searches Wattpad for your query.',
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = class WikiaCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'wikia',
|
||||
aliases: ['fandom'],
|
||||
aliases: ['fandom', 'wikia-article', 'fandom-article'],
|
||||
group: 'search',
|
||||
memberName: 'wikia',
|
||||
description: 'Searches a specified Wikia wiki for your query.',
|
||||
|
||||
@@ -7,6 +7,7 @@ module.exports = class WikipediaCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'wikipedia',
|
||||
aliases: ['wikipedia-article'],
|
||||
group: 'search',
|
||||
memberName: 'wikipedia',
|
||||
description: 'Searches Wikipedia for your query.',
|
||||
|
||||
@@ -7,6 +7,7 @@ module.exports = class YouTubeCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'youtube',
|
||||
aliases: ['youtube-video'],
|
||||
group: 'search',
|
||||
memberName: 'youtube',
|
||||
description: 'Searches YouTube for your query.',
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class YuGiOhCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'yu-gi-oh',
|
||||
aliases: ['yu-gi-oh-card'],
|
||||
group: 'search',
|
||||
memberName: 'yu-gi-oh',
|
||||
description: 'Responds with info on a Yu-Gi-Oh! card.',
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = class MorseCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'morse',
|
||||
aliases: ['morse-code'],
|
||||
group: 'text-edit',
|
||||
memberName: 'morse',
|
||||
description: 'Converts text to morse code.',
|
||||
|
||||
@@ -9,6 +9,7 @@ module.exports = class TranslateCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'translate',
|
||||
aliases: ['yandex', 'yandex-translate', 'translate-yandex'],
|
||||
group: 'text-edit',
|
||||
memberName: 'translate',
|
||||
description: 'Translates text to a specified language.',
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = class UpsideDownCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'upside-down',
|
||||
aliases: ['udown'],
|
||||
aliases: ['u-down'],
|
||||
group: 'text-edit',
|
||||
memberName: 'upside-down',
|
||||
description: 'Flips text upside-down.',
|
||||
|
||||
@@ -5,6 +5,7 @@ module.exports = class ZalgoCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'zalgo',
|
||||
aliases: ['zalgolize'],
|
||||
group: 'text-edit',
|
||||
memberName: 'zalgo',
|
||||
description: 'Converts text to zalgo.',
|
||||
|
||||
@@ -5,7 +5,7 @@ module.exports = class DonateCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'donate',
|
||||
aliases: ['patreon'],
|
||||
aliases: ['patreon', 'paypal', 'ko-fi'],
|
||||
group: 'util',
|
||||
memberName: 'donate',
|
||||
description: 'Responds with Xiao\'s donation links.',
|
||||
|
||||
@@ -5,6 +5,7 @@ module.exports = class InviteCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'invite',
|
||||
aliases: ['invite-link'],
|
||||
group: 'util',
|
||||
memberName: 'invite',
|
||||
description: 'Responds with an invite for the bot and an invite to the home server.',
|
||||
|
||||
@@ -4,7 +4,7 @@ module.exports = class ShutdownCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'shutdown',
|
||||
aliases: ['restart', 'power-off'],
|
||||
aliases: ['restart', 'power-off', 'die'],
|
||||
group: 'util',
|
||||
memberName: 'shutdown',
|
||||
description: 'Shuts down the current shard, or all shards.',
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "42.11.0",
|
||||
"version": "42.12.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Shard.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user