fix(cache): guild props being removed before saving to cache

This commit is contained in:
DjDeveloper 2021-02-23 13:31:55 +05:30 committed by GitHub
parent 8e5a76dbe8
commit 2b0db63f82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -147,6 +147,7 @@ export class GuildManager extends BaseManager<GuildPayload, Guild> {
/** Sets a value to Cache */
async set(key: string, value: GuildPayload): Promise<any> {
value = { ...value }
if ('roles' in value) value.roles = []
if ('emojis' in value) value.emojis = []
if ('members' in value) value.members = []