Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Commit 2f0d5a6

Browse files
committed
fixed type issue with context_command cogs
1 parent 429ff38 commit 2f0d5a6

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,14 @@ You can find more (and better) examples [here](https://github.com/discord-py-ui/
176176

177177
# Changelog
178178

179+
- <details>
180+
<summary>4.2.11</summary>
181+
182+
## **Fixed**
183+
- cog context commands returned wrong type
184+
185+
</details>
186+
179187
- <details>
180188
<summary>4.2.10</summary>
181189

discord_ui/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@
4444

4545

4646
__title__ = "discord-ui"
47-
__version__ = "4.2.10"
47+
__version__ = "4.2.11"

discord_ui/cogs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,9 @@ async def mention(ctx, user):
504504
"""
505505
def wraper(callback):
506506
if type in ["user", 2]:
507-
return CogMessageCommand(callback, name, guild_ids=guild_ids, default_permission=default_permission, guild_permissions=guild_permissions)
508-
elif type in ["message", 3]:
509507
return CogUserCommand(callback, name, guild_ids=guild_ids, default_permission=default_permission, guild_permissions=guild_permissions)
508+
elif type in ["message", 3]:
509+
return CogMessageCommand(callback, name, guild_ids=guild_ids, default_permission=default_permission, guild_permissions=guild_permissions)
510510
else:
511511
raise InvalidArgument("Invalid context type! type has to be one of 'user', 1, 'message', 2!")
512512
return wraper

0 commit comments

Comments
 (0)