nextcord icon indicating copy to clipboard operation
nextcord copied to clipboard

fix: Messageable.send is partially unknown

Open teaishealthy opened this issue 3 years ago • 1 comments

Summary

Resolves #771 by adding typehints to the non-overload method

Checklist

  • [x] If code changes were made then they have been tested.
    • [ ] I have updated the documentation to reflect the changes.
    • [x] I have run task pyright and fixed the relevant issues.
  • [x] 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, ...)

teaishealthy avatar Sep 04 '22 20:09 teaishealthy

Nonces within channels can be Union[int, str] which represents the typing changes within http as seen at https://discord.com/developers/docs/resources/channel. Still not entirely sure of this change however.

tts is typed as non optional as all overloads specify it and defaults to False, inline with http

Skelmis avatar Sep 11 '22 06:09 Skelmis

Should these overloads also include Optional?

image

DenverCoder1 avatar Oct 04 '22 12:10 DenverCoder1