Skip to content

Conversation

@VincentRPS
Copy link

No description provided.

@plun1331 plun1331 requested a review from Copilot May 10, 2025 07:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors type annotations for parameters that previously defaulted to MISSING by augmenting them with a union involving utils.Undefined. This change is applied consistently across multiple modules (e.g. member, interactions, integrations, HTTP, guild, etc.) to improve clarity and type safety of optional parameters.

  • Updated function signatures to include unions like “… | utils.Undefined” for optional parameters.
  • Changes span core modules and extensions, ensuring that the new typing pattern is applied uniformly.
  • The refactor is intended to improve API clarity and maintainability without altering the runtime behavior.

Reviewed Changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
discord/member.py Updated edit() parameters to include union with utils.Undefined
discord/interactions.py Modified message editing parameters with extended type unions
discord/integrations.py Similar changes to optional parameters using utils.Undefined
discord/http.py Updated session initialization signature to use the new union type
discord/guild.py Revised channel creation and edit methods with proper type unions
... (other files updated similarly) Consistent application of new union annotations across modules

@plun1331 plun1331 merged commit de83d48 into master May 10, 2025
@plun1331
Copy link
Member

i didnt actually test this, i'm just assuming you're right

@VincentRPS
Copy link
Author

i didnt actually test this, i'm just assuming you're right

I started my bot and it worked, so it should be fine since no logic is changed

@Paillat-dev
Copy link
Member

@plun1331 What was breaking here ? Just the type change ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants