Skip to content

Commit c7cb45d

Browse files
authored
fix(guild): create_sticker limit error message; implicit None return type (#3263)
1 parent 40dc21c commit c7cb45d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ These changes are available on the `master` branch, but have not yet been releas
1616

1717
### Fixed
1818

19+
- Fix error message for `Guild.create_sticker`.
20+
([#3263](https://github.com/Pycord-Development/pycord/pull/3263))
1921
- Fix typehint for `SlashCommandGroup.__new__`.
2022
([#3235](https://github.com/Pycord-Development/pycord/pull/3235))
2123
- Include `bypass_slowmode` in `Permissions.all`.

discord/guild.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3084,7 +3084,7 @@ async def create_sticker(
30843084
raise TypeError('"name" parameter must be 2 to 30 characters long.')
30853085

30863086
if description and not (2 <= len(description) <= 100):
3087-
raise TypeError('"description" parameter must be 2 to 200 characters long.')
3087+
raise TypeError('"description" parameter must be 2 to 100 characters long.')
30883088

30893089
payload = {"name": name, "description": description or ""}
30903090

@@ -3327,7 +3327,7 @@ async def fetch_role(self, role_id: int) -> Role:
33273327
data = await self._state.http.get_role(self.id, role_id)
33283328
return Role(guild=self, state=self._state, data=data)
33293329

3330-
async def _fetch_role(self, role_id: int) -> Role:
3330+
async def _fetch_role(self, role_id: int) -> Role | None:
33313331
"""|coro|
33323332
33333333
Retrieves a :class:`Role` that the guild has.

0 commit comments

Comments
 (0)