update discord bot (#4837)
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
|
import textwrap
|
||||||
|
|
||||||
webhook_url = os.getenv('DISCORD_WEBHOOK_URL')
|
webhook_url = os.getenv('DISCORD_WEBHOOK_URL')
|
||||||
release_version = os.getenv('RELEASE_VERSION')
|
release_version = os.getenv('RELEASE_VERSION')
|
||||||
@ -25,12 +26,11 @@ if len(modified_release_body) > max_length:
|
|||||||
|
|
||||||
# Message to send to Discord
|
# Message to send to Discord
|
||||||
data = {
|
data = {
|
||||||
"content":
|
"content": textwrap.dedent(f'''
|
||||||
f'''
|
|
||||||
**{release_version}** is now available! Check out the latest features and improvements here: <https://zoo.dev/modeling-app/download>
|
**{release_version}** is now available! Check out the latest features and improvements here: <https://zoo.dev/modeling-app/download>
|
||||||
|
|
||||||
{modified_release_body}
|
{modified_release_body}
|
||||||
''',
|
'''),
|
||||||
"username": "Modeling App Release Updates",
|
"username": "Modeling App Release Updates",
|
||||||
"avatar_url": "https://raw.githubusercontent.com/KittyCAD/modeling-app/main/public/discord-avatar.png"
|
"avatar_url": "https://raw.githubusercontent.com/KittyCAD/modeling-app/main/public/discord-avatar.png"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user