mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-14 08:08:34 +02:00
Only explicit jokes in NSFW channels
This commit is contained in:
@@ -31,7 +31,7 @@ module.exports = class ChuckNorrisCommand extends Command {
|
|||||||
async run(msg) {
|
async run(msg) {
|
||||||
if (!this.categories) await this.fetchCategories();
|
if (!this.categories) await this.fetchCategories();
|
||||||
const categories = msg.channel.nsfw
|
const categories = msg.channel.nsfw
|
||||||
? this.categories
|
? 'explicit'
|
||||||
: this.categories.filter(cat => !nsfwCategories.includes(cat));
|
: this.categories.filter(cat => !nsfwCategories.includes(cat));
|
||||||
const { body } = await request
|
const { body } = await request
|
||||||
.get('https://api.chucknorris.io/jokes/random')
|
.get('https://api.chucknorris.io/jokes/random')
|
||||||
|
|||||||
Reference in New Issue
Block a user