From fa806047fbfbc21331d70063f5de14d4f65cd18f Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 25 May 2017 22:38:18 +0000 Subject: [PATCH] NSFW Giphy in NSFW Channels --- commands/search/giphy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/search/giphy.js b/commands/search/giphy.js index d83c02d5..d911a384 100644 --- a/commands/search/giphy.js +++ b/commands/search/giphy.js @@ -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;