mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 22:27:44 +02:00
Set NSFW to false in DM
This commit is contained in:
@@ -28,11 +28,12 @@ module.exports = class GoogleCommand extends Command {
|
|||||||
|
|
||||||
async run(msg, { query }) {
|
async run(msg, { query }) {
|
||||||
let href;
|
let href;
|
||||||
|
const nsfw = msg.channel.nsfw || false;
|
||||||
try {
|
try {
|
||||||
href = await this.searchGoogle(query, msg.channel.nsfw);
|
href = await this.searchGoogle(query, nsfw);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
try {
|
try {
|
||||||
href = await this.customSearch(query, msg.channel.nsfw);
|
href = await this.customSearch(query, nsfw);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
href = `http://lmgtfy.com/?iie=1&q=${encodeURIComponent(query)}`;
|
href = `http://lmgtfy.com/?iie=1&q=${encodeURIComponent(query)}`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user