Skip to content

Commit 55d36d5

Browse files
authored
feat: implement forum helpers (#1087)
* feat: helpers helpers helpers * docs: helpers helpers helpers * Update error.py
1 parent 57c2dbe commit 55d36d5

File tree

4 files changed

+344
-13
lines changed

4 files changed

+344
-13
lines changed

interactions/api/error.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def lookup(code: int) -> str:
9191
11: "Error creating your command.",
9292
12: "Invalid set of arguments specified.",
9393
13: "No HTTPClient set!",
94+
14: "Fatal conflict between object and attempted action.",
9495
# HTTP errors
9596
400: "Bad Request. The request was improperly formatted, or the server couldn't understand it.",
9697
401: "Not authorized. Double check your token to see if it's valid.",

interactions/api/http/channel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ async def edit_tag(
368368
Route("PUT", f"/channels/{channel_id}/tags/{tag_id}"), json=_dct
369369
)
370370

371-
async def delete_tag(self, channel_id: int, tag_id: int) -> dict:
371+
async def delete_tag(self, channel_id: int, tag_id: int) -> None: # wha?
372372
"""
373373
Delete a forum tag.
374374

interactions/api/http/thread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ async def create_thread_in_forum(
228228
payload["applied_tags"] = applied_tags
229229

230230
data = None
231-
if files is not MISSING and len(files) > 0:
231+
if files is not MISSING and files and len(files) > 0: # edge case `None`
232232

233233
data = MultipartWriter("form-data")
234234
part = data.append_json(payload)

0 commit comments

Comments
 (0)