mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-04-27 00:52:24 +12:00
fix adding thread to case if no reason is provided
This commit is contained in:
parent
bf75836874
commit
db0e283177
|
@ -1306,7 +1306,8 @@ class Punish(commands.Cog):
|
|||
# modify case to include mention to thread channel for easy access
|
||||
if thread_id is not None:
|
||||
try:
|
||||
edits = {"reason": reason + f"\n\n<#{thread_id}>"}
|
||||
new_reason = reason + f"\n\n<#{thread_id}>" if reason is not None else f"<#{thread_id}>"
|
||||
edits = {"reason": new_reason}
|
||||
await case.edit(edits)
|
||||
except Exception as e:
|
||||
await ctx.send(warning(f"Couldn't edit case to add thread mention: {e}"))
|
||||
|
|
Loading…
Reference in a new issue