Skip to content

Commit 9f1412b

Browse files
CopilotSoheab
andcommitted
Fix two isinstance checks to use TypeError instead of ValueError
Co-authored-by: Soheab <[email protected]>
1 parent 5e6ee00 commit 9f1412b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord/guild.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ def _create_channel(
12071207
if overwrites is MISSING:
12081208
overwrites = {}
12091209
elif not isinstance(overwrites, dict):
1210-
raise ValueError("overwrites parameter expects a dict.")
1210+
raise TypeError("overwrites parameter expects a dict.")
12111211

12121212
perms = []
12131213
for target, perm in overwrites.items():
@@ -3297,7 +3297,7 @@ async def edit_role_positions(self, positions: dict[Snowflake, int], *, reason:
32973297
An invalid keyword argument was given.
32983298
"""
32993299
if not isinstance(positions, dict):
3300-
raise ValueError("positions parameter expects a dict.")
3300+
raise TypeError("positions parameter expects a dict.")
33013301

33023302
role_positions: list[dict[str, Any]] = []
33033303
for role, position in positions.items():

0 commit comments

Comments
 (0)