mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 23:38:32 +00:00
Added types to bypasses object
This commit is contained in:
parent
ee9e44d2d7
commit
c090b8b329
1 changed files with 164 additions and 154 deletions
|
@ -74,7 +74,17 @@ const UserContext: NavContextMenuPatchCallback = (children, { user }: ContextPro
|
|||
));
|
||||
};
|
||||
|
||||
let bypasses;
|
||||
type Bypasses = {
|
||||
guilds: string[];
|
||||
channels: string[];
|
||||
users: string[];
|
||||
};
|
||||
|
||||
let bypasses: Bypasses = {
|
||||
guilds: [],
|
||||
channels: [],
|
||||
users: [],
|
||||
};
|
||||
|
||||
const settings = definePluginSettings({
|
||||
guilds: {
|
||||
|
@ -83,7 +93,7 @@ const settings = definePluginSettings({
|
|||
default: "",
|
||||
placeholder: "Separate with commas",
|
||||
onChange: async function (value) {
|
||||
bypasses["guild"] = value.replace(/\s/g, '').split(',').filter(id => id.trim() !== '');
|
||||
bypasses["guilds"] = value.replace(/\s/g, '').split(',').filter(id => id.trim() !== '');
|
||||
await DataStore.set("bypassdnd", bypasses);
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue