This commit is contained in:
Dragon Fire
2021-02-28 15:02:01 -05:00
parent 5d31050a45
commit f61df82de7
2 changed files with 5 additions and 4 deletions
+4 -4
View File
@@ -163,11 +163,11 @@ client.on('message', async msg => {
if (!call.adminCall && (msg.guild && (!msg.channel.topic || !msg.channel.topic.includes('<xiao:phone>')))) return;
if (!call.active) return;
if (call.adminCall && msg.guild.id === call.origin.guild.id && !client.isOwner(msg.author)) return;
// try {
try {
await call.send(origin ? call.recipient : call.origin, msg, hasText, hasImage, hasEmbed);
//} catch {
// return; // eslint-disable-line no-useless-return
//}
} catch {
return; // eslint-disable-line no-useless-return
}
});
client.on('guildCreate', async guild => {
+1
View File
@@ -207,6 +207,7 @@ module.exports = class Util {
static stripNSFWURLs(str, siteList, text = '[redacted nsfw url]') {
const uris = str.match(/(https?:\/\/\S+)/g);
if (!uris) return str;
for (const uri of uris) {
const parsed = url.parse(uri);
if (!siteList.some(pornURL => parsed.host === pornURL)) continue;