mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-18 08:43:57 +00:00
fix(bots/discord/utils/discord/rolePresets): correct property access for presets
This commit is contained in:
@@ -46,7 +46,7 @@ export const removeRolePreset = async (member: GuildMember, presetName: PresetKe
|
|||||||
* @returns The currently applied presets AND a callback function to run after correcting the presets in the database
|
* @returns The currently applied presets AND a callback function to run after correcting the presets in the database
|
||||||
*/
|
*/
|
||||||
const commonOperations = async (presetName: string, member: GuildMember, applying: boolean) => {
|
const commonOperations = async (presetName: string, member: GuildMember, applying: boolean) => {
|
||||||
const preset = config.rolePresets?.guilds[presetName]?.[member.guild.id]
|
const preset = config.rolePresets?.guilds[member.guild.id]?.[presetName]
|
||||||
if (!preset) throw new Error(`The preset "${presetName}" does not exist for this server`)
|
if (!preset) throw new Error(`The preset "${presetName}" does not exist for this server`)
|
||||||
|
|
||||||
const roles = new Set(member.roles.cache.keys())
|
const roles = new Set(member.roles.cache.keys())
|
||||||
|
|||||||
Reference in New Issue
Block a user