Commit 1507cc1
committed
refactor: handle
Get a reference of `roleString` as early as possible, and be more
explicit about which argument we want to get from the arguments list.
At any given point (think, a future update to some library like JDA),
the list we are getting all of our arguments from could end up looking
from this:
[1192015871509315, "Role String"]
to:
[1192015871509315, "Role String", 24]
Therefore, making `args.getLast()` entirely obsolete. Being more
explicit about the argument number we would like to get reduces the
chances of something like this happening.
Suggested-by: Zabuzard <zabuza.dev@gmail.com>
Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>roleString from early on1 parent 643d600 commit 1507cc1
File tree
1 file changed
+2
-1
lines changed- application/src/main/java/org/togetherjava/tjbot/features/roleapplication
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | | - | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
0 commit comments