-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor interactions #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2a59f72
to
f4f46e6
Compare
Adds a new interface InteractionMessager, and sets it as the first parameter in the helper methods for responding to interactions. This change is backwards compatible with the previous struct that was required, and is as such not a breaking change to those functions.
19f24a1
to
ab0e1f9
Compare
interactions/admin/admin.go
Outdated
|
||
return e.CreateMessage( | ||
discord.NewMessageCreateBuilder(). | ||
SetContent(message). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use the same builder here
ab0e1f9
to
b01d6b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Godt gjort! Takk for denne refaktoriseringa; kodebasen er langt betre organisert no. Klart for å verta squasha og samanslått.
Tusen takk for at du tok deg tid til å se gjennom den store PR-en min :) |
Major refactoring regarding interactions / application commands
This PR puts previous commands and components in their own packages, under the infractions package. This results in interactions being more organised by their commands and related features, as well as moving registering to the interaction router within the package of each interaction package.
There has also been some light refactoring for code reuse, but also splitting up into multiple files, so that large commands such as the admin one has separate files for each sub-command, as it relates to configuration for various features.