Skip to content

Commit

Permalink
discord title limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name authored and alphatownsman committed Dec 30, 2024
1 parent df2b48f commit de84de7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ def discord_send(channel, content, **args) -> bool:
dw = settings.DISCORD_WEBHOOKS.get(channel)
if not dw:
return False
if "thread_name" in args:
args["thread_name"] = args["thread_name"][:99]
webhook = SyncWebhook.from_url(dw)
webhook.send(content, **args)
return True

0 comments on commit de84de7

Please sign in to comment.