mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 23:38:32 +00:00
Updated validateWhitelist
This commit is contained in:
parent
df0a29fc16
commit
0e494fc22b
1 changed files with 6 additions and 1 deletions
|
@ -75,7 +75,12 @@ export default definePlugin({
|
||||||
|
|
||||||
function validateWhitelist(value: string) {
|
function validateWhitelist(value: string) {
|
||||||
const whitelist = parseWhitelist(value);
|
const whitelist = parseWhitelist(value);
|
||||||
return !whitelist.some(id => !isValidUserId(id));
|
if (whitelist.length === 0 && value.trim() !== "") {
|
||||||
|
showToast("Invalid User ID: One or more User IDs in the whitelist are invalid. Please check your input.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
showToast("Whitelist Updated: Reply ping whitelist has been successfully updated.");
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseWhitelist(value: string) {
|
function parseWhitelist(value: string) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue