mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 15:57:50 +02:00
Blacklisted users banned from phone
This commit is contained in:
@@ -156,6 +156,7 @@ client.on('message', async msg => {
|
|||||||
const hasImage = msg.attachments.size !== 0;
|
const hasImage = msg.attachments.size !== 0;
|
||||||
const hasEmbed = msg.embeds.length !== 0;
|
const hasEmbed = msg.embeds.length !== 0;
|
||||||
if (msg.author.bot || (!hasText && !hasImage && !hasEmbed)) return;
|
if (msg.author.bot || (!hasText && !hasImage && !hasEmbed)) return;
|
||||||
|
if (client.blacklist.user.includes(msg.author.id)) return;
|
||||||
const origin = client.phone.find(call => call.origin.id === msg.channel.id);
|
const origin = client.phone.find(call => call.origin.id === msg.channel.id);
|
||||||
const recipient = client.phone.find(call => call.recipient.id === msg.channel.id);
|
const recipient = client.phone.find(call => call.recipient.id === msg.channel.id);
|
||||||
if (!origin && !recipient) return;
|
if (!origin && !recipient) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user