mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -12,7 +12,7 @@ module.exports = class SubredditCommand extends Command {
|
||||
async run(msg, { subreddit }) {
|
||||
if (!subreddit) subreddit = typeof this.subreddit === 'function' ? this.subreddit() : this.subreddit;
|
||||
try {
|
||||
const { post, subreddit } = await this.random(msg.channel.nsfw);
|
||||
const { post, subreddit } = await this.random(subreddit, msg.channel.nsfw);
|
||||
if (!post) return msg.reply(`I couldn't fetch anything from r/${subreddit}...`);
|
||||
return msg.say(this.generateText(post, subreddit));
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user