mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 05:49:49 +02:00
Do not import IDs already in blacklist
This commit is contained in:
@@ -70,10 +70,12 @@ module.exports = class XiaoClient extends CommandoClient {
|
|||||||
if (!file.guild || !file.user) return null;
|
if (!file.guild || !file.user) return null;
|
||||||
for (const id of file.guild) {
|
for (const id of file.guild) {
|
||||||
if (typeof id !== 'string') continue;
|
if (typeof id !== 'string') continue;
|
||||||
|
if (this.blacklist.guild.includes(id)) continue;
|
||||||
this.blacklist.guild.push(id);
|
this.blacklist.guild.push(id);
|
||||||
}
|
}
|
||||||
for (const id of file.user) {
|
for (const id of file.user) {
|
||||||
if (typeof id !== 'string') continue;
|
if (typeof id !== 'string') continue;
|
||||||
|
if (this.blacklist.user.includes(id)) continue;
|
||||||
this.blacklist.user.push(id);
|
this.blacklist.user.push(id);
|
||||||
}
|
}
|
||||||
return file;
|
return file;
|
||||||
|
|||||||
Reference in New Issue
Block a user