Set NSFW to false in DM

This commit is contained in:
Daniel Odendahl Jr
2018-08-28 17:03:11 +00:00
parent 33ff6cea9d
commit 7f040d5b12
+3 -2
View File
@@ -28,11 +28,12 @@ module.exports = class GoogleCommand extends Command {
async run(msg, { query }) {
let href;
const nsfw = msg.channel.nsfw || false;
try {
href = await this.searchGoogle(query, msg.channel.nsfw);
href = await this.searchGoogle(query, nsfw);
} catch (err) {
try {
href = await this.customSearch(query, msg.channel.nsfw);
href = await this.customSearch(query, nsfw);
} catch (err) {
href = `http://lmgtfy.com/?iie=1&q=${encodeURIComponent(query)}`;
}