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: add missing delete_after parameter #2156

Conversation

Seltsamsel
Copy link
Contributor

Summary

This fixes a typing error when doing something like

await ctx.defer()
await ctx.followup.send('something', ephemeral=True, delete_after=15)
error: No overload variant of "send" of "Webhook" matches argument types "str", "bool", "int"  [call-overload]
note: Possible overload variants:
note:     def send(self, content: str = ..., *, username: str = ..., avatar_url: Any = ..., tts: bool = ..., ephemeral: bool = ..., file: File = ..., files: List[File] = ..., embed: Embed = ..., embeds: List[Embed] = ..., allowed_mentions: AllowedMentions = ..., view: View = ..., thread: Snowflake = ..., thread_name: Optional[str] = ..., wait: Literal[True]) -> Coroutine[Any, Any, WebhookMessage]
note:     def send(self, content: str = ..., *, username: str = ..., avatar_url: Any = ..., tts: bool = ..., ephemeral: bool = ..., file: File = ..., files: List[File] = ..., embed: Embed = ..., embeds: List[Embed] = ..., allowed_mentions: AllowedMentions = ..., view: View = ..., thread: Snowflake = ..., thread_name: Optional[str] = ..., wait: Literal[False] = ...) -> Coroutine[Any, Any, None]

I guess when the delete_after parameter was added it was simply forgotten in the overloads.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
  • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

Copy link
Member

@Lulalaby Lulalaby left a comment

Choose a reason for hiding this comment

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

Changelog

Copy link
Member

@JustaSqu1d JustaSqu1d left a comment

Choose a reason for hiding this comment

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

^

auto-merge was automatically disabled June 30, 2023 12:45

Head branch was pushed to by a user without write access

@Lulalaby Lulalaby merged commit 0e2a0d8 into Pycord-Development:master Jun 30, 2023
25 checks passed
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