Commit 4d2673d
committed
log(application-command): handle null cases
During the event `onStringSelectSelection` which would be called when
someone would select one role in the application form, there would be a
possibility for:
- The `member` to be null (most likely from interacting in a
non-guild environment, which is rare and almost impossible).
- `event.getSelectedOptions()` to be an empty list, effectively
meaning that a form was somehow made with no options and a user
(or should we say member in our case) managed to interact with it.
In any case, properly log errors in the logger in case either of these
happen to be null or otherwise have unexpected values.
Suggested-by: Zabuzard <zabuza.dev@gmail.com>
Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>1 parent c4aeb1a commit 4d2673d
File tree
1 file changed
+12
-1
lines changed- application/src/main/java/org/togetherjava/tjbot/features/roleapplication
1 file changed
+12
-1
lines changedLines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| |||
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
122 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
123 | 134 | | |
124 | 135 | | |
125 | 136 | | |
| |||
0 commit comments