mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 23:38:32 +00:00
removed the isValidUserId (oops)
This commit is contained in:
parent
3afece4dbc
commit
338b969094
1 changed files with 1 additions and 4 deletions
|
@ -46,7 +46,7 @@ export default definePlugin({
|
||||||
if (!repliedMessage || repliedMessage.author.id !== user.id) return;
|
if (!repliedMessage || repliedMessage.author.id !== user.id) return;
|
||||||
|
|
||||||
const whitelist = settings.store.replyPingWhitelist.split(",").map(id => id.trim());
|
const whitelist = settings.store.replyPingWhitelist.split(",").map(id => id.trim());
|
||||||
const isWhitelisted = whitelist.some(id => isValidUserId(id) && message.author.id === id);
|
const isWhitelisted = whitelist.some(id => message.author.id === id);
|
||||||
|
|
||||||
if (isWhitelisted || settings.store.alwaysPingOnReply) {
|
if (isWhitelisted || settings.store.alwaysPingOnReply) {
|
||||||
if (!message.mentions.some(mention => mention.id === user.id)) {
|
if (!message.mentions.some(mention => mention.id === user.id)) {
|
||||||
|
@ -63,7 +63,4 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function isValidUserId(id: string) {
|
|
||||||
return /^\d+$/.test(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue