Skip to content

Commit 29a93ac

Browse files
committed
Change app commands description from None to an empty string before get.
1 parent 1e77d6e commit 29a93ac

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

discord/bot.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ async def register_commands(self) -> None:
186186
cmds = await self.http.bulk_upsert_global_commands(self.user.id, commands)
187187

188188
for i in cmds:
189+
# Discord seems to now return None instead of an empty string...
190+
if i["description"] is None:
191+
i['description'] = ""
192+
189193
cmd = get(
190194
self.pending_application_commands,
191195
name=i["name"],
@@ -225,6 +229,10 @@ async def register_commands(self) -> None:
225229
raise
226230
else:
227231
for i in cmds:
232+
# Discord seems to now return None instead of an empty string...
233+
if i["description"] is None:
234+
i['description'] = ""
235+
228236
cmd = get(
229237
self.pending_application_commands,
230238
name=i["name"],

0 commit comments

Comments
 (0)