Skip to content

Commit b026baa

Browse files
Enhance Discord release notifications
- Use an embed for a richer message format. - Mention a role to notify users. - Add a timestamp and footer to the notification embed.
1 parent 1ba90e2 commit b026baa

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

post-discord-release.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,20 @@ discordMessage += `:arrow_down: [Direct APK Download](<${REPO_URL}/releases/dow
125125

126126
// Send to Discord
127127
const payload = JSON.stringify({
128-
content: discordMessage,
129-
username: "Multi Launcher Updates!",
130-
avatar_url: "https://github.com/DroidWorksStudio/mLauncher/blob/main/fastlane/metadata/android/en-US/images/icon.png?raw=true",
128+
content: "<@&1159595417219104768>",
129+
username: "Multi Launcher Updates!",
130+
avatar_url: "https://github.com/DroidWorksStudio/mLauncher/blob/main/fastlane/metadata/android/en-US/images/icon.png?raw=true",
131+
embeds: [
132+
{
133+
description: discordMessage, // your original message goes here
134+
color: 0xffff00, // optional color in hexadecimal
135+
timestamp: new Date(), // optional timestamp
136+
footer: {
137+
text: "Multi Launcher Updates",
138+
icon_url: "https://github.com/DroidWorksStudio/mLauncher/blob/main/fastlane/metadata/android/en-US/images/icon.png?raw=true"
139+
}
140+
}
141+
]
131142
});
132143

133144
const url = new URL(WEBHOOK_URL);

0 commit comments

Comments
 (0)