From bb511abc03bb66848947e37a999502b813c77269 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Thu, 23 Jul 2020 23:24:17 -0700 Subject: goodbye old uwufier :cry: --- src/commands/fun/subreddit.ts | 46 ------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/commands/fun/subreddit.ts (limited to 'src/commands/fun/subreddit.ts') diff --git a/src/commands/fun/subreddit.ts b/src/commands/fun/subreddit.ts deleted file mode 100644 index a9369d2..0000000 --- a/src/commands/fun/subreddit.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Command, CommandoMessage } from 'discord.js-commando'; -import SubredditCommandBase from '../../models/commands/Subreddit.js' -import { shorten, formatNumber } from '../../utils/Util.js' -import { MessageEmbed } from 'discord.js'; - -module.exports = class SubredditFun extends SubredditCommandBase { - constructor(client) { - super(client, { - name: 'subreddit', - aliases: ['r/', 'sub', 'reddit'], - patterns: [/^r\/(.+)/i], - group: 'fun', - memberName: 'subreddit', - description: 'Replies with a random post from a specified subreddit.', - args: [ - { - key: 'sSub', - prompt: 'Which subreddit would you like to get a post from?', - type: 'string', - parse: subreddit => encodeURIComponent(subreddit) - } - ], - examples: ['uwu!say hi'], - throttling: { - usages: 5, - duration: 30 - }, - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] - }); - } - generateText(post, subreddit, icon) { - const embed = new MessageEmbed() - .setColor(0xFFCC4D) - .setAuthor(`r/${subreddit}`, icon, `https://www.reddit.com/r/${subreddit}/`) - .setTitle(shorten(post.title, 256)) - .setImage(post.post_hint === 'image' ? post.url : null) - .setURL(`https://www.reddit.com${post.permalink}`) - .setTimestamp(post.created_utc * 1000) - .setFooter(`⬆ ${formatNumber(post.score)}`); - if (post.thumbnail && post.thumbnail !== 'self' && post.post_hint !== 'image') { - embed.setThumbnail(post.thumbnail); - } - return embed; - } -}; \ No newline at end of file -- cgit v1.2.3