mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
NSFW Giphy in NSFW Channels
This commit is contained in:
@@ -29,7 +29,8 @@ module.exports = class GiphyCommand extends Command {
|
||||
.get('http://api.giphy.com/v1/gifs/search')
|
||||
.query({
|
||||
q: query,
|
||||
api_key: GIPHY_KEY
|
||||
api_key: GIPHY_KEY,
|
||||
rating: msg.channel.nsfw ? 'r' : 'pg'
|
||||
});
|
||||
if (!body.data.length) throw new Error('No Results.');
|
||||
const random = Math.floor(Math.random() * body.data.length) + 1;
|
||||
|
||||
Reference in New Issue
Block a user