From e1664566769b4f356e63e6129eca222c9d8dd9c1 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 7 Jun 2020 20:58:50 -0400 Subject: [PATCH] Awwnime Command, Reddit command fixes and new subs --- README.md | 8 +++++--- assets/json/porn.json | 9 ++++++++- commands/random-img/awwnime.js | 30 ++++++++++++++++++++++++++++++ commands/random-img/hentai.js | 4 ++-- commands/random-img/meme.js | 2 +- commands/random-img/porn.js | 4 ++-- package.json | 2 +- 7 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 commands/random-img/awwnime.js diff --git a/README.md b/README.md index fa3434dc..7ee0457d 100644 --- a/README.md +++ b/README.md @@ -224,7 +224,7 @@ in the appropriate channel's topic to use it. ## Commands -Total: 458 +Total: 459 ### Utility: @@ -320,6 +320,7 @@ Total: 458 ### Random Image: +* **awwnime:** Responds with cute random anime art. * **bird:** Responds with a random image of a bird. * **bunny:** Responds with a random image of a bunny. * **cat:** Responds with a random cat image. @@ -1226,9 +1227,9 @@ here. - [Overtime2005](https://github.com/Overtime2005) * alert (Concept) * dislike (Concept) - * hentai (Subreddit List) + * hentai (Original Subreddit List) * like (Concept) - * porn (Subreddit List) + * porn (Original Subreddit List) * simp (Concept) - [PAC-MAN Party](http://pacman.com/en/pac-man-games/pac-man-party) * balloon-pop (Concept) @@ -1285,6 +1286,7 @@ here. - [RedBubble - Akbar Mna](https://www.redbubble.com/en/people/akbarmna/shop) * hat ([Megumin Hat Image](https://www.redbubble.com/people/akbarmna/works/25443591-megumins-hat-minimalistic?p=poster)) - [Reddit](https://www.reddit.com/) + * awwnime ([API](https://www.reddit.com/dev/api/)) * hentai ([API](https://www.reddit.com/dev/api/)) * meme ([API](https://www.reddit.com/dev/api/)) * porn ([API](https://www.reddit.com/dev/api/)) diff --git a/assets/json/porn.json b/assets/json/porn.json index 89b221b9..144cc4f1 100644 --- a/assets/json/porn.json +++ b/assets/json/porn.json @@ -19,5 +19,12 @@ "nsfw_plowcam", "legalteens", "pornstarlethq", - "biggerthanyouthought" + "biggerthanyouthought", + "onoff", + "shorthairchicks", + "petitegonewild", + "plastt", + "bustypetite", + "cumsluts", + "amateur" ] diff --git a/commands/random-img/awwnime.js b/commands/random-img/awwnime.js new file mode 100644 index 00000000..29289a77 --- /dev/null +++ b/commands/random-img/awwnime.js @@ -0,0 +1,30 @@ +const SubredditCommand = require('../../structures/commands/Subreddit'); +const { MessageEmbed } = require('discord.js'); +const { formatNumber } = require('../../util/Util'); + +module.exports = class AwwnimeCommand extends SubredditCommand { + constructor(client) { + super(client, { + name: 'awwnime', + aliases: ['aww-anime', 'moe'], + group: 'random-img', + memberName: 'meme', + description: 'Responds with cute random anime art.', + clientPermissions: ['EMBED_LINKS'], + postType: 'image', + getIcon: true, + subreddit: 'awwnime' + }); + } + + generateText(post, subreddit, icon) { + return new MessageEmbed() + .setColor(0xFF4500) + .setAuthor(`r/${subreddit}`, icon, `https://www.reddit.com/r/${subreddit}/`) + .setTitle(post.title) + .setImage(post.post_hint === 'image' ? post.url : null) + .setURL(`https://www.reddit.com${post.permalink}`) + .setTimestamp(post.created_utc * 1000) + .setFooter(`⬆ ${formatNumber(post.ups)}`); + } +}; diff --git a/commands/random-img/hentai.js b/commands/random-img/hentai.js index c9b56fa3..84c221ba 100644 --- a/commands/random-img/hentai.js +++ b/commands/random-img/hentai.js @@ -11,7 +11,7 @@ module.exports = class HentaiCommand extends SubredditCommand { memberName: 'hentai', description: 'Responds with a random hentai image.', details: `**Subreddits:** ${subreddits.join(', ')}`, - clientPermissions: ['ATTACH_FILES'], + clientPermissions: ['EMBED_LINKS'], nsfw: true, postType: 'image', getIcon: true, @@ -19,7 +19,7 @@ module.exports = class HentaiCommand extends SubredditCommand { { name: 'Overtime2005', url: 'https://github.com/Overtime2005', - reason: 'Subreddit List' + reason: 'Original Subreddit List' } ], args: [ diff --git a/commands/random-img/meme.js b/commands/random-img/meme.js index 1972ee21..d249965d 100644 --- a/commands/random-img/meme.js +++ b/commands/random-img/meme.js @@ -11,7 +11,7 @@ module.exports = class MemeCommand extends SubredditCommand { memberName: 'meme', description: 'Responds with a random meme.', details: `**Subreddits:** ${subreddits.join(', ')}`, - clientPermissions: ['ATTACH_FILES'], + clientPermissions: ['EMBED_LINKS'], postType: 'image', getIcon: true, args: [ diff --git a/commands/random-img/porn.js b/commands/random-img/porn.js index 6685fb9e..e51874b0 100644 --- a/commands/random-img/porn.js +++ b/commands/random-img/porn.js @@ -12,7 +12,7 @@ module.exports = class PornCommand extends SubredditCommand { memberName: 'porn', description: 'Responds with a random porn image.', details: `**Subreddits:** ${subreddits.join(', ')}`, - clientPermissions: ['ATTACH_FILES'], + clientPermissions: ['EMBED_LINKS'], nsfw: true, postType: 'image', getIcon: true, @@ -20,7 +20,7 @@ module.exports = class PornCommand extends SubredditCommand { { name: 'Overtime2005', url: 'https://github.com/Overtime2005', - reason: 'Subreddit List' + reason: 'Original Subreddit List' } ], args: [ diff --git a/package.json b/package.json index 23c1c578..80a03c67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "116.3.1", + "version": "116.4.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {