Awwnime Command, Reddit command fixes and new subs

This commit is contained in:
Dragon Fire
2020-06-07 20:58:50 -04:00
parent bd7d4177df
commit e166456676
7 changed files with 49 additions and 10 deletions
+30
View File
@@ -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)}`);
}
};
+2 -2
View File
@@ -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: [
+1 -1
View File
@@ -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: [
+2 -2
View File
@@ -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: [