-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync application and discord role changes
- Loading branch information
1 parent
eaa78d8
commit 9a985c7
Showing
13 changed files
with
353 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/de/webalf/slotbot/model/event/GuildUserCreatedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package de.webalf.slotbot.model.event; | ||
|
||
import de.webalf.slotbot.model.GuildUser; | ||
import de.webalf.slotbot.util.permissions.Role; | ||
import lombok.NonNull; | ||
|
||
/** | ||
* Notifies about a new guild user | ||
* | ||
* @author Alf | ||
* @since 08.10.2023 | ||
*/ | ||
public record GuildUserCreatedEvent(long guildId, long userId, Role role) { | ||
public GuildUserCreatedEvent(@NonNull GuildUser guildUser) { | ||
this(guildUser.getGuild().getId(), guildUser.getUser().getId(), guildUser.getRole()); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/de/webalf/slotbot/model/event/GuildUserDeleteEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package de.webalf.slotbot.model.event; | ||
|
||
import de.webalf.slotbot.model.GuildUser; | ||
import de.webalf.slotbot.util.permissions.Role; | ||
import lombok.NonNull; | ||
|
||
/** | ||
* Notifies about user removed from a guild | ||
* | ||
* @author Alf | ||
* @since 08.10.2023 | ||
*/ | ||
public record GuildUserDeleteEvent(long guildId, long userId, Role role) { | ||
public GuildUserDeleteEvent(@NonNull GuildUser guildUser) { | ||
this(guildUser.getGuild().getId(), guildUser.getUser().getId(), guildUser.getRole()); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/de/webalf/slotbot/model/event/GuildUserRoleUpdateEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package de.webalf.slotbot.model.event; | ||
|
||
import de.webalf.slotbot.model.GuildUser; | ||
import de.webalf.slotbot.util.permissions.Role; | ||
import lombok.NonNull; | ||
|
||
/** | ||
* Notifies about a change in a guild user's role | ||
* | ||
* @author Alf | ||
* @since 03.10.2023 | ||
*/ | ||
public record GuildUserRoleUpdateEvent(long guildId, long userId, Role oldRole, Role newRole) { | ||
public GuildUserRoleUpdateEvent(@NonNull GuildUser guildUser, Role oldRole) { | ||
this(guildUser.getGuild().getId(), guildUser.getUser().getId(), oldRole, guildUser.getRole()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.