mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Awwnime Command, Reddit command fixes and new subs
This commit is contained in:
@@ -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)}`);
|
||||
}
|
||||
};
|
||||
@@ -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: [
|
||||
|
||||
@@ -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: [
|
||||
|
||||
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user