mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 07:46:43 +02:00
28 lines
708 B
JavaScript
28 lines
708 B
JavaScript
const SubredditCommandBase = require('../../framework/Commands/Subreddit');
|
|
|
|
module.exports = class SubredditCommand extends SubredditCommandBase {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'subreddit',
|
|
aliases: ['r/', 'sub'],
|
|
group: 'random-res',
|
|
memberName: 'subreddit',
|
|
description: 'Responds with a random post from a subreddit.',
|
|
clientPermissions: ['EMBED_LINKS'],
|
|
getIcon: true,
|
|
args: [
|
|
{
|
|
key: 'subreddit',
|
|
prompt: 'What subreddit would you like to get a post from?',
|
|
type: 'string',
|
|
parse: subreddit => encodeURIComponent(subreddit)
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
generateText(post, subreddit, icon) {
|
|
return this.makeEmbed(post, subreddit, icon);
|
|
}
|
|
};
|