mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-23 01:25:02 +00:00
fix persist store data
This commit is contained in:
parent
7f2731262d
commit
0db0aa886b
1 changed files with 1 additions and 2 deletions
|
@ -13,10 +13,9 @@ export const StoreDataEvt = persistEvt({
|
||||||
let persist = false;
|
let persist = false;
|
||||||
const persistData: IPartialPersistData = {};
|
const persistData: IPartialPersistData = {};
|
||||||
const config = await pluginData.config.getForUser(member.user);
|
const config = await pluginData.config.getForUser(member.user);
|
||||||
|
|
||||||
const persistedRoles = config.persisted_roles;
|
const persistedRoles = config.persisted_roles;
|
||||||
if (persistedRoles.length && member.roles) {
|
if (persistedRoles.length && member.roles) {
|
||||||
const rolesToPersist = intersection(persistedRoles, member.roles);
|
const rolesToPersist = intersection(persistedRoles, [...member.roles.cache.keys()]);
|
||||||
if (rolesToPersist.length) {
|
if (rolesToPersist.length) {
|
||||||
persist = true;
|
persist = true;
|
||||||
persistData.roles = rolesToPersist;
|
persistData.roles = rolesToPersist;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue