mirror of
https://github.com/hencaric/SCNewsBot.git
synced 2026-08-16 22:46:03 +01:00
fix url not saving when editing announcement
This commit is contained in:
@@ -211,10 +211,16 @@ class Announcement:
|
|||||||
if len(split_message) == 2:
|
if len(split_message) == 2:
|
||||||
ping_preview = split_message[1]
|
ping_preview = split_message[1]
|
||||||
|
|
||||||
|
url = None
|
||||||
|
description = embed.description
|
||||||
|
if len(embed.description.split("\n\n")) > 0:
|
||||||
|
url = embed.description.split("\n\n")[0]
|
||||||
|
description = "\n\n".join(embed.description.split("\n\n")[1:])
|
||||||
|
|
||||||
return cls(
|
return cls(
|
||||||
title=embed.title,
|
title=embed.title,
|
||||||
url=embed.url,
|
url=url,
|
||||||
description=embed.description,
|
description=description,
|
||||||
image_url=embed.image.url,
|
image_url=embed.image.url,
|
||||||
channel=message.channel,
|
channel=message.channel,
|
||||||
ping=ping,
|
ping=ping,
|
||||||
|
|||||||
Reference in New Issue
Block a user