Skip to content

Commit 3d80a69

Browse files
authored
feat: add new error codes (#1160)
1 parent bd10d8a commit 3d80a69

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

interactions/api/error.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,11 @@ def lookup(code: int) -> str:
209209
40033: "This message has already been crossposted",
210210
40041: "An application command with that name already exists",
211211
40043: "Application interaction failed to send",
212+
40058: "Cannot send a message in a forum channel",
212213
40060: "Interaction has already been acknowledged",
213214
40061: "Tag names must be unique",
215+
40066: "There are no tags available that can be set by non-moderators",
216+
40067: "A tag is required to create a forum post in this channel",
214217
50001: "Missing access",
215218
50002: "Invalid account type",
216219
50003: "Cannot execute action on a DM channel",
@@ -286,7 +289,10 @@ def lookup(code: int) -> str:
286289
180002: "Failed to create stage needed for stage event",
287290
200000: "Message was blocked by automatic moderation",
288291
200001: "Title was blocked by automatic moderation",
292+
220002: "Webhooks posted to forum channels cannot have both a thread_name and thread_id",
289293
220003: "Webhooks can only create threads in forum channels",
294+
220004: "Webhook services cannot be used in forum channels",
295+
240000: "Message blocked by harmful links filter",
290296
}.get(code, f"Unknown error: {code}")
291297

292298
def __init__(self, code: int = 0, message: str = None, severity: int = 0, **kwargs):

0 commit comments

Comments
 (0)