Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(StageInstance): Ensure discoverableDisabled is not undefined #6395

Merged
merged 1 commit into from Aug 12, 2021

Conversation

Jiralite
Copy link
Member

Please describe the changes this PR makes and why it should be merged:
StageInstance#discoverableDisabled was possibly undefined.

This can occur via the following steps:

  1. Start a stage channel instance
  2. End the stage channel instance
  3. Restart the bot to ensure that the instance is not cached
  4. Fetch the audit log entry for this stage instance
Response
GuildAuditLogsEntry {
  targetType: 'STAGE_INSTANCE',
  actionType: 'DELETE',
  action: 'STAGE_INSTANCE_DELETE',
  reason: null,
  executor: User {},
  changes: [
    { key: 'topic', old: 'hi', new: undefined },
    { key: 'privacy_level', old: 2, new: undefined }
  ],
  id: '875086920567377920',
  extra: {
    channel: StageChannel {
      type: 'GUILD_STAGE_VOICE',
      deleted: false,
      guild: [Guild],
      guildId: '534940241002233896',
      parentId: '610956146450235414',
      permissionOverwrites: [PermissionOverwriteManager],
      id: '875085532114321409',
      name: 'hi',
      rawPosition: 0,
      rtcRegion: null,
      bitrate: 64000,
      userLimit: 10000,
      topic: null
    }
  },
  target: StageInstance {
    id: '875085574103511081',
    deleted: false,
    guildId: '534940241002233896',
    channelId: '875085532114321409',
    topic: 'hi',
    privacyLevel: 'GUILD_ONLY',
    discoverableDisabled: undefined
  }
}

This pull request asserts this property to null in the case of not knowing anything about this property.

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@Jiralite Jiralite changed the title fix: ensure StageInstance#discoverableDisabled is null fix: ensure StageInstance#discoverableDisabled is not undefined Aug 11, 2021
@iCrawl iCrawl added this to the Version 13.1 milestone Aug 11, 2021
@Jiralite Jiralite changed the title fix: ensure StageInstance#discoverableDisabled is not undefined fix(StageInstance): Ensure discoverableDisabled is not undefined Aug 11, 2021
@iCrawl iCrawl merged commit dce8fc7 into discordjs:main Aug 12, 2021
@Jiralite Jiralite deleted the discoverable-disabled-fix branch August 12, 2021 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants