diff options
| author | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
| commit | bb511abc03bb66848947e37a999502b813c77269 (patch) | |
| tree | 612c010fc8317e1cdf11471a18aad0270819d33e /src/commands/minecraft | |
| parent | fix: if clear amount equal or over 100, round down to 99 (diff) | |
| download | dep-core-bb511abc03bb66848947e37a999502b813c77269.tar.xz dep-core-bb511abc03bb66848947e37a999502b813c77269.zip | |
goodbye old uwufier :cry:
Diffstat (limited to 'src/commands/minecraft')
| -rw-r--r-- | src/commands/minecraft/getbody.ts | 45 | ||||
| -rw-r--r-- | src/commands/minecraft/getface.ts | 43 | ||||
| -rw-r--r-- | src/commands/minecraft/gethead.ts | 43 | ||||
| -rw-r--r-- | src/commands/minecraft/getminime.ts | 59 | ||||
| -rw-r--r-- | src/commands/minecraft/getskin.ts | 43 | ||||
| -rw-r--r-- | src/commands/minecraft/minecraftserverstatus.ts | 76 |
6 files changed, 0 insertions, 309 deletions
diff --git a/src/commands/minecraft/getbody.ts b/src/commands/minecraft/getbody.ts deleted file mode 100644 index 072a9d2..0000000 --- a/src/commands/minecraft/getbody.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; -import { MessageEmbed } from 'discord.js'; - -module.exports = class GetBodyMinecraft extends Command { - constructor(client: CommandoClient) { - super(client, { - name: 'getbody', - aliases: [ - 'get-body', - 'getmcbody', - 'get-mc-body', - 'gmcb' - ], - group: 'minecraft', - memberName: 'getbody', - description: 'Grabs a specified player\'s body from Minecraft.', - examples: [ - 'uwu!getbody notch', - 'uwu!gmcb sin' - ], - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - throttling: { - usages: 5, - duration: 30 - }, - args: [ - { - key: 'uUsername', - prompt: 'What is the account name of the user?', - type: 'string' - } - ] - }); - } - async run(msg: CommandoMessage, { uUsername }: any) { - let emb = new MessageEmbed() - .setColor(0xFFCC4D) - .setAuthor(uUsername, `https://minotar.net/body/${encodeURIComponent(uUsername)}`) - .setImage(`https://minotar.net/body/${encodeURIComponent(uUsername)}`) - - console.debug(`URL for ${uUsername}:`, emb.image?.url) - return msg.reply(emb) - } -};
\ No newline at end of file diff --git a/src/commands/minecraft/getface.ts b/src/commands/minecraft/getface.ts deleted file mode 100644 index 7565d68..0000000 --- a/src/commands/minecraft/getface.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; -import { MessageEmbed } from 'discord.js'; - -module.exports = class GetFaceMinecraft extends Command { - constructor(client: CommandoClient) { - super(client, { - name: 'getface', - aliases: [ - 'get-face', - 'getmcface', - 'get-mc-face', - 'gmcf' - ], - group: 'minecraft', - memberName: 'getface', - description: 'Grabs a specified player\'s face from Minecraft.', - examples: [ - 'uwu!getface notch', - 'uwu!gmcf sin' - ], - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - throttling: { - usages: 5, - duration: 30 - }, - args: [ - { - key: 'uUsername', - prompt: 'What is the account name of the user?', - type: 'string' - } - ] - }); - } - async run(msg: CommandoMessage, { uUsername }: any) { - let emb = new MessageEmbed() - .setColor(0xFFCC4D) - .setAuthor(uUsername, `https://minotar.net/helm/${encodeURIComponent(uUsername)}`) - .setImage(`https://minotar.net/helm/${encodeURIComponent(uUsername)}`) - return msg.reply(emb) - } -};
\ No newline at end of file diff --git a/src/commands/minecraft/gethead.ts b/src/commands/minecraft/gethead.ts deleted file mode 100644 index 4ae61e2..0000000 --- a/src/commands/minecraft/gethead.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; -import { MessageEmbed } from 'discord.js'; - -module.exports = class GetHeadMinecraft extends Command { - constructor(client: CommandoClient) { - super(client, { - name: 'gethead', - aliases: [ - 'get-head', - 'getmchead', - 'get-mc-head', - 'gmch' - ], - group: 'minecraft', - memberName: 'gethead', - description: 'Grabs a specified player\'s head from Minecraft.', - examples: [ - 'uwu!gethead notch', - 'uwu!gmch sin' - ], - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - throttling: { - usages: 5, - duration: 30 - }, - args: [ - { - key: 'uUsername', - prompt: 'What is the account name of the user?', - type: 'string' - } - ] - }); - } - async run(msg: CommandoMessage, { uUsername }: any) { - let emb = new MessageEmbed() - .setColor(0xFFCC4D) - .setAuthor(uUsername, `https://minotar.net/helm/${encodeURIComponent(uUsername)}`) - .setImage(`https://minotar.net/cube/${encodeURIComponent(uUsername)}/100.png`) - return msg.reply(emb) - } -};
\ No newline at end of file diff --git a/src/commands/minecraft/getminime.ts b/src/commands/minecraft/getminime.ts deleted file mode 100644 index c06c7aa..0000000 --- a/src/commands/minecraft/getminime.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; -import { MessageEmbed } from 'discord.js'; - -module.exports = class GetMiniMeMinecraft extends Command { - constructor(client: CommandoClient) { - super(client, { - name: 'getminime', - aliases: [ - 'get-mini-me', - 'getmcminime', - 'get-mc-mini-me', - 'gmcmm' - ], - group: 'minecraft', - memberName: 'getminime', - description: 'Grabs a specified player\'s skin from Minecraft.', - examples: [ - 'uwu!getminime notch', - 'uwu!gmcmm sin false' - ], - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - throttling: { - usages: 5, - duration: 30 - }, - args: [ - { - key: 'uUsername', - prompt: 'What is the account name of the user?', - type: 'string' - }, - { - key: 'uTrans', - prompt: 'Would you like the background to be transparant? (yes or no)', - type: 'string', - default: true - } - ] - }); - } - async run(msg: CommandoMessage, { uUsername, uTrans }: any) { - console.debug('Transparency value:', uTrans) - - let emb = new MessageEmbed() - .setColor(0xFFCC4D) - .setAuthor(uUsername, `http://minecraftskinavatar.com/customize?id=${encodeURIComponent(uUsername)}&source=minecraft`, `https://minotar.net/helm/${encodeURIComponent(uUsername)}`) - .setFooter('[Provided by minecraftskinavatar.com](Provided by minecraftskinavatar.com)') - - if (uTrans) { - emb.setImage(`http://avatar.yourminecraftservers.com/avatar/trnsp/steve/tall/128/${encodeURIComponent(uUsername)}.png`) - } else { - emb.setImage(`http://avatar.yourminecraftservers.com/avatar/rad/steve/tall/128/${encodeURIComponent(uUsername)}.png`) - } - - console.debug(`Image URL for ${uUsername}: ${emb.image?.url}`) - return msg.reply(emb) - } -};
\ No newline at end of file diff --git a/src/commands/minecraft/getskin.ts b/src/commands/minecraft/getskin.ts deleted file mode 100644 index 137e9b0..0000000 --- a/src/commands/minecraft/getskin.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; -import { MessageEmbed } from 'discord.js'; - -module.exports = class GetSkinMinecraft extends Command { - constructor(client: CommandoClient) { - super(client, { - name: 'getskin', - aliases: [ - 'get-skin', - 'getmcskin', - 'get-mc-skin', - 'gmcs' - ], - group: 'minecraft', - memberName: 'getskin', - description: 'Grabs a specified player\'s skin from Minecraft.', - examples: [ - 'uwu!getskin notch', - 'uwu!gmcs sin' - ], - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - throttling: { - usages: 5, - duration: 30 - }, - args: [ - { - key: 'uUsername', - prompt: 'What is the account name of the user?', - type: 'string' - } - ] - }); - } - async run(msg: CommandoMessage, { uUsername }: any) { - let emb = new MessageEmbed() - .setColor(0xFFCC4D) - .setAuthor(uUsername, `https://minotar.net/helm/${encodeURIComponent(uUsername)}`) - .setImage(`https://minotar.net/skin/${encodeURIComponent(uUsername)}`) - return msg.reply(emb) - } -};
\ No newline at end of file diff --git a/src/commands/minecraft/minecraftserverstatus.ts b/src/commands/minecraft/minecraftserverstatus.ts deleted file mode 100644 index 706b43f..0000000 --- a/src/commands/minecraft/minecraftserverstatus.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; -import { MessageEmbed } from 'discord.js'; -import axios from 'axios' -//@ts-ignore no types -import emoji from 'emoji-random' - -module.exports = class MinecraftServerMinecraft extends Command { - constructor(client: CommandoClient) { - super(client, { - name: 'minecraftserverstatus', - aliases: [ - 'mcserverstatus', - 'minecraft-server-status', - 'mcss' - ], - group: 'utility', - memberName: 'minecraftserverstatus', - description: 'Grabs you the server status of a Minecraft server.', - examples: [ - 'uwu!minecraftserverstatus', - 'uwu!mcss' - ], - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - throttling: { - usages: 5, - duration: 30 - }, - args: [ - { - key: 'ip', - prompt: 'What is the IP of the server?', - type: 'string' - }, - { - key: 'port', - prompt: 'What is the port of the server?', - type: 'integer', - default: '25565', - max: 65535, - min: 1 - } - ] - }); - } - async run(msg: CommandoMessage, { ip, port }: any) { - const res = ( - await axios(`https://mcapi.us/server/status?ip=${ip}&port=${port}`).catch(err => { - console.error(err) - return msg.reply('Woops, an error has occured. ' + emoji.random()) - }) - //@ts-ignore yes this exists... - ).data - - if (res.status !== 'success') { - return msg.reply('Woops, there was an error with your request. ' + emoji.random()) - } - - let emb = new MessageEmbed() - .setTitle(ip) - .setTimestamp(res.last_updated) - .setColor(0xFFCC4D) - - if (res.online) { - emb.addField('Server Status', 'Currentaly online.', true) - emb.addField('Version', res.server.name, true) - emb.addField('Members', `${res.players.now}/${res.players.max}`, true) - emb.addField('MOTD', `\`\`\`${res.motd}\`\`\``, true) - } else if (res.last_online) { - emb.addField('Server Status', `Offline. Last seen ${new Date(res.last_online)}`, true) - } else { - emb.addField('Server Status', 'Offline. Never seen online before.', true) - } - return msg.reply(emb) - } -};
\ No newline at end of file |