-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/xdnw/locutus
- Loading branch information
Showing
5 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/main/java/link/locutus/discord/apiv3/enums/ApiKeyPermission.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,26 @@ | ||
package link.locutus.discord.apiv3.enums; | ||
|
||
public enum ApiKeyPermission { | ||
NATION_VIEW_RESOURCES, | ||
NATION_DEPOSIT_TO_BANK, | ||
NATION_MILITARY_BUYS, | ||
NATION_SEE_RESET_TIMERS, | ||
NATION_SEE_SPIES, | ||
NATION_VIEW_TRADES, | ||
NATION_ACCEPT_TRADE, | ||
NATION_SEND_MESSAGE, // To be used in the `/api/send-message` endpoint | ||
ALLIANCE_VIEW_BANK, | ||
ALLIANCE_WITHDRAW_BANK, | ||
ALLIANCE_CHANGE_PERMISSIONS, | ||
ALLIANCE_SEE_SPIES, | ||
ALLIANCE_SEE_RESET_TIMERS, | ||
ALLIANCE_TAX_BRACKETS, | ||
ALLIANCE_ACCEPT_APPLICANTS, | ||
ALLIANCE_REMOVE_MEMBERS, | ||
ALLIANCE_MANAGE_TREATIES, | ||
ALLIANCE_PROMOTE_SELF_TO_LEADER; | ||
|
||
public boolean has(int permission) { | ||
return (permission & (1 << this.ordinal())) > 0; | ||
} | ||
} |
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