Commit 6a048ba
committed
feat(discord): Improve release announcement formatting
This commit introduces a new function, `formatLauncherVersion`, to parse the release title and format it more clearly for Discord announcements.
The new format extracts the app name, version, and build number, transforming a title like `- AppName ‧ (1.11.2.6)` into `AppName 1.11.2 Build 6`.
Additionally, the calculation for the `Content-Length` header in the webhook request has been corrected to use `Buffer.byteLength(payload)` instead of `payload.length` to ensure accurate byte counting for the JSON payload.1 parent b45c844 commit 6a048ba
1 file changed
+19
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
111 | 128 | | |
112 | 129 | | |
113 | 130 | | |
| |||
140 | 157 | | |
141 | 158 | | |
142 | 159 | | |
143 | | - | |
| 160 | + | |
144 | 161 | | |
145 | 162 | | |
146 | 163 | | |
| |||
166 | 183 | | |
167 | 184 | | |
168 | 185 | | |
169 | | - | |
| 186 | + | |
170 | 187 | | |
171 | 188 | | |
172 | 189 | | |
| |||
0 commit comments