fix: GuildSettingData#mute_config is null

This commit is contained in:
March 7th 2023-01-18 17:09:32 +07:00
parent 1e5e855ca0
commit 78250d866e

View File

@ -87,12 +87,12 @@ class GuildSettingManager extends BaseManager {
*/ */
this.muted = data.muted; this.muted = data.muted;
} }
if ('mute_config' in data) { if ('mute_config' in data && data.mute_config !== null) {
/** /**
* Mute config (muted = true) * Mute config (muted = true)
* * `muteConfig.endTime`: End time (Date) * * `muteConfig.endTime`: End time (Date)
* * `muteConfig.selectedTimeWindow`: Selected time window (seconds) (number) * * `muteConfig.selectedTimeWindow`: Selected time window (seconds) (number)
* @type {?Date} * @type {?Object}
*/ */
this.muteConfig = { this.muteConfig = {
endTime: new Date(data.mute_config.end_time), endTime: new Date(data.mute_config.end_time),