-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Discord webhook #875
Discord webhook #875
Conversation
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.
Took a first pass on this.
Might be worth considering using the lib that EventWar uses, there's a lots of stuff in the DiscordWebhook class that doesn't get used by SW at all.
src/main/java/com/gmail/goosius/siegewar/events/SiegeCampStartEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/events/SiegeCampStartEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/listeners/SiegeWarSelfListener.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/timeractions/AttackerTimedWin.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/timeractions/DefenderTimedWin.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/utils/SiegeWarBattleSessionUtil.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/utils/SiegeWarBattleSessionUtil.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/utils/SiegeWarBattleSessionUtil.java
Outdated
Show resolved
Hide resolved
also from what i was told in the discord this is the same webhook class that eventwar uses unless you've changed it since getting the class from peti way back when |
…. make the config notification toggles work. add siege remove notification
… ending it, add defending town name to remove notification, fix siege start notification check
all comments addressed, ready for re-review |
Hi @LlmDl I was talking to Ewof earlier, and he has addressed all the comments he is aware of. Pinging here to remind ourselves where we are at with this PR before we forget. |
src/main/java/com/gmail/goosius/siegewar/events/SiegeCampStartEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/listeners/SiegeWarSelfListener.java
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/utils/SiegeWarBattleSessionUtil.java
Outdated
Show resolved
Hide resolved
fix end notification not firing
src/main/java/com/gmail/goosius/siegewar/settings/SiegeWarSettings.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/listeners/SiegeWarSelfListener.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/events/SiegeWarStartEvent.java
Outdated
Show resolved
Hide resolved
i pushed another commit called reviews idk y it doesn't show here on the pr but it's there |
I dont see the commit here. |
src/main/java/com/gmail/goosius/siegewar/events/SiegeRemoveEvent.java
Outdated
Show resolved
Hide resolved
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.
It took a little bit but I am happy with this.
I will leave this to @Goosius1 to merge at his leisure. |
Great thanks Llama!. I'll now do a secondary review. |
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.
Review complete. 1 comment.
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.
Looks good to me. Well done!!!!
Description:
Users can now have siege war notifications in their discords
it uses the localization so works on all supported languages
New Nodes/Commands/ConfigOptions:
DISCORD_WEBHOOK (comment)
DISCORD_WEBHOOK_ENABLED (boolean)
DISCORD_WEBHOOK_URL (string)
DISCORD_WEBHOOK_NOTICIATION_SESSION_START (boolean)
DISCORD_WEBHOOK_NOTIFICATION_SESSION_END (boolean)
DISCORD_WEBHOOK_NOTIFICATION_SIEGECAMP_START (boolean)
DISCORD_WEBHOOK_NOTIFICATION_SIEGE_START (boolean)
DISCORD_WEBHOOK_NOTIFICATION_SIEGE_END (boolean)
DISCORD_WEBHOOK_NOTIFICATION_SIEGE_REMOVE (boolean)
Relevant Issue ticket:
By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the SiegeWar License for perpetuity.