mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-15 15:57:47 +02:00
NSFW Filter in company
This commit is contained in:
@@ -34,6 +34,9 @@ module.exports = class CompanyCommand extends Command {
|
|||||||
try {
|
try {
|
||||||
const data = await this.fetchCompany(query);
|
const data = await this.fetchCompany(query);
|
||||||
if (!data) return msg.say('Could not find any results.');
|
if (!data) return msg.say('Could not find any results.');
|
||||||
|
if (!msg.channel.nsfw && this.client.adultSiteList.includes(data.domain)) {
|
||||||
|
return msg.reply('This site is NSFW.');
|
||||||
|
}
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setTitle(data.name)
|
.setTitle(data.name)
|
||||||
.setImage(data.logo)
|
.setImage(data.logo)
|
||||||
|
|||||||
Reference in New Issue
Block a user