Commit 57a0230
GH-75 Add Discord Integration
* Begin working on Discord integration
* Finish implementing Discord integration
* Add `@Async` annotation to command executors to ensure that the server's main thread is not blocked
* Remove `@Async` annotations
* Refactor Discord integration to use reactive programming for login and verification processes
* Remove redundant check for bot admin role ID in Discord configuration validation
* Update src/main/java/com/eternalcode/parcellockers/discord/repository/DiscordLinkRepositoryOrmLite.java
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Update src/main/java/com/eternalcode/parcellockers/discord/repository/DiscordLinkRepositoryOrmLite.java
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Add service layer
* Add DiscordSRV hook integration
* feat: Update DiscordSRV integration and add parcel delivery notifications
* feat: Implement abstract DiscordNotificationService with Discord4J and DiscordSRV support
* fix: declare appropriate events as async
* fix: avoid DiscordClientManager#getClient race conditions by using blocking discord login
* Remove redundant discord properties
* Update src/main/java/com/eternalcode/parcellockers/discord/command/DiscordLinkCommand.java
Co-authored-by: Copilot <[email protected]>
* fix: initialize DiscordLinkRepository only when fallback Discord integration is enabled
* Update src/main/java/com/eternalcode/parcellockers/discord/command/DiscordLinkCommand.java
Co-authored-by: Copilot <[email protected]>
* Update src/main/java/com/eternalcode/parcellockers/discord/command/DiscordLinkCommand.java
Co-authored-by: Copilot <[email protected]>
* Update src/main/java/com/eternalcode/parcellockers/configuration/implementation/MessageConfig.java
Co-authored-by: Copilot <[email protected]>
* Update src/main/java/com/eternalcode/parcellockers/discord/command/DiscordLinkCommand.java
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* fix: add logging to DiscordSrvLinkService for better error handling
* Update PluginConfig.java
Co-authored-by: Copilot <[email protected]>
* Update ParcelDeliverNotificationController.java
Co-authored-by: Copilot <[email protected]>
* Update ParcelDeliverNotificationController.java
Co-authored-by: Copilot <[email protected]>
* Add missing import
* WIP - Adjust to DMK suggestions
* Use OfflinePlayer instead of String
* Use OfflinePlayer in unlinkPlayer executor too
* Align with single-responsibility-principle
* Ensure proper encapsulation
* Refactor sendPrivateMessage method to return void and improve message handling
* Improve error logging in DiscordClientManager during login failure
* Refactor Discord ID handling to use long, add NoticeHandler, remove redundant javadocs
* Delete random javadocs
* Refactor Discord notification handling, introduce Formatter for message templating, and add DiscordProviderPicker for improved integration
* Refactor notification handling to use thenAcceptBoth for improved message delivery and update LiteCommandsBuilder type
* Refactor Discord link/unlink to use result enums
* Use FutureHandler
* Subscribe to the DiscordClient logout rather than blocking the thread.
* Refactor Discord verification handling to utilize configurable link code expiration and improve cache management
* Adjust to Gemini suggestions
* Adjust to Martin suggestion with delay calculation
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>1 parent 33e6910 commit 57a0230
File tree
36 files changed
+1545
-6
lines changed- src/main/java/com/eternalcode/parcellockers
- command/handler
- configuration/implementation
- discord
- argument
- command
- controller
- discordsrv
- command
- notification
- notification
- repository
- verification
- itemstorage/event
- locker/event
- parcel/event
36 files changed
+1545
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
| |||
108 | 115 | | |
109 | 116 | | |
110 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
111 | 122 | | |
112 | 123 | | |
113 | 124 | | |
| |||
124 | 135 | | |
125 | 136 | | |
126 | 137 | | |
| 138 | + | |
127 | 139 | | |
128 | 140 | | |
129 | 141 | | |
| |||
Lines changed: 36 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
| 55 | + | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
| 60 | + | |
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
| 67 | + | |
59 | 68 | | |
| 69 | + | |
60 | 70 | | |
61 | 71 | | |
62 | 72 | | |
| |||
72 | 82 | | |
73 | 83 | | |
74 | 84 | | |
| 85 | + | |
75 | 86 | | |
76 | 87 | | |
77 | 88 | | |
| |||
175 | 186 | | |
176 | 187 | | |
177 | 188 | | |
178 | | - | |
| 189 | + | |
179 | 190 | | |
| 191 | + | |
180 | 192 | | |
181 | 193 | | |
182 | 194 | | |
183 | 195 | | |
184 | 196 | | |
185 | | - | |
| 197 | + | |
| 198 | + | |
186 | 199 | | |
187 | 200 | | |
188 | 201 | | |
189 | 202 | | |
190 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
191 | 213 | | |
192 | 214 | | |
193 | 215 | | |
| |||
205 | 227 | | |
206 | 228 | | |
207 | 229 | | |
208 | | - | |
209 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
210 | 237 | | |
211 | 238 | | |
212 | 239 | | |
| |||
224 | 251 | | |
225 | 252 | | |
226 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
227 | 258 | | |
228 | 259 | | |
229 | 260 | | |
| |||
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
Lines changed: 110 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
| |||
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
181 | 291 | | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
357 | 360 | | |
358 | 361 | | |
359 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
360 | 375 | | |
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments