You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update JDA remove Ban function
Why was ban a thing
* Refactor
* Refactor + Update README
* Update config.yml
* Update README.md
* Update README.md
* Catching null error
* Removed debug shit
* Update NitroRemover.java
oopsie
* clean up
* Incorrect Option Name
* Update information about main channel use
Might change config name at a later date cant think of a viable replacement that makes sense
* Update README.md
* Incorrect getRoles method
* Update README.md
* Minecraft username check
* Resolve Bot missing MemberCaching
* Change command detection to updated name
* Use Mojang API instead of Electroid's API
* Gang use java 21
* Remove unnecessary CompletableFuture
* final clean up
* Remove needing nitro role to run remove
Unnecessary check in case for whatever reason someone has in game Nitro perks somehow and needs to get rid of them for whatever reason
* Update to Spotless
A hired a certain fruit to take care of this stuff and he is NOT doing his job.
---------
Co-authored-by: Pear <20259871+TheRealPear@users.noreply.github.com>
This project is a fork of applenick's [Nitro](https://github.com/applenick/Nitro), a Discord -> Minecraft bot which allows for Nitro users to claim an in-game rank or perks.
2
+
This project is a fork of applenick's [Nitro](https://github.com/applenick/Nitro), a Discord to Minecraft bot which allows Nitro users to claim an in-game rank or perks.
3
3
4
4
This plugin was originally created for use on [Overcast Community](https://oc.tc), while this specific fork has some changes to benefit [Warzone](https://github.com/Warzone). For OCC, its functionality has likely been adapted and implemented into Cloudy, a (sadly) closed source all-in-one bot with a variety of features (also developed by [applenick](https://github.com/applenick)).
5
5
6
6
**Disclaimer:** The changes present in this fork were implemented with beginner-level Java experience. I am almost sure that there are cleaner, more efficient ways of accomplishing what has been done. I apologize to those more knowledgeable in that regard. However, I am very open to receive constructive criticism and accept pull requests with better code from other developers.
7
7
8
8
## Features and functionality
9
9
10
-
- Using `!nitro help` will show the user a list of available commands.
10
+
- Using `/help` will show the user a list of available commands.
11
11
12
-
- Nitro Boosting privileges can be claimed or redeemed by users to the Minecraft account/player of their choice. To do this, simply instruct the user to enter `!nitro-redeem <minecraft username>` into the designated redemption channel (specified in `config.yml` through `channel-main`).
12
+
- Nitro Boosting privileges can be claimed or redeemed by users to the Minecraft account/player of their choice. To do this, simply instruct the user to enter `/redeem <minecraft username>` into the designated redemption channel (specified in `config.yml` through `channel-main`).
13
13
14
-
- Users may also remove their own privileges by using `!nitro-remove`.
14
+
- Users may also remove their own privileges by using `/remove`.
15
15
16
16
- When the user does redeem Nitro privileges, the plugin will execute, through the console, the commands present in `redemption-commands`. A similar process will take place once the user stops boosting the server or loses the "boosting" role (meaning the removal commands will be executed).
17
17
@@ -35,11 +35,11 @@ removal-commands:
35
35
- Active Nitro Boosters will be stored in `config.yml` under `nitro-boosters`.
36
36
```yml
37
37
38
-
# List of nitro boosters
38
+
# List of Nitro boosters
39
39
# Format
40
-
# Discord username with discriminator : Discord User ID : Minecraft username : Minecraft UUID
40
+
# Discord username : Discord User ID : Minecraft username : Minecraft UUID
- Messages detailing the Discord user that has claimed Nitro perks and their target Minecraft username will be logged to both the server's console and the designated alerts channel (`channel-alerts`).
@@ -52,65 +52,60 @@ nitro-boosters:
52
52
53
53
A number of commands are only available to staff in the configured staff channel of the configuration (`channel-staff`).
54
54
55
-
- `!nitro-list <boosters|bans|commands>`
55
+
- `/list <boosters|commands>`
56
56
- `boosters`: Lists all Nitro boosters that have redeemed Nitro privileges.
57
-
- `bans`: Lists all users that have been banned from redeemed Nitro privileges.
58
57
- `commands`: Lists the redemption and removal commands present in the configuration.
59
-
- `!nitro-force-remove`: Forcefully removes an active Nitro booster from the `nitro-boosters` list in the configuration. This command will execute the available removal commands for the targeted user.
60
-
- `!nitro-ban <discriminated username> <discord id>`: Bans a user from redeeming Nitro privileges.
61
-
- Banning a user will prevent them from using `!nitro-redeem` or `!nitro-remove` again until they are unbanned.
62
-
- If the user was present in the `nitro-boosters` list, they will also be removed from it and removal commands will be executed.
63
-
- `!nitro-unban <discriminated username> <discord id>`: Unbans a user from redeeming Nitro privileges.
64
-
- Unbanning a user will allow them to use `!nitro-redeem` or `!nitro-remove` again.
65
-
- `!nitro-reload`: Reloads the configuration file.
58
+
- `/revoke`: Forcefully removes an active Nitro booster from the `nitro-boosters` list in the configuration. This command will execute the available removal commands for the targeted user.
59
+
- `/config-reload`: Reloads the configuration file.
60
+
66
61
## Building
67
62
68
63
1. First, [clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) or download the project's source code.
69
64
2. Optionally, make your desired changes.
70
-
3. Run the code formatter, following Google's [code style.](https://google.github.io/styleguide/javaguide.html)
71
-
```bash
72
-
mvn com.coveo:fmt-maven-plugin:format
73
-
```
65
+
3. Run the code formatter, following [Google's code style](https://google.github.io/styleguide/javaguide.html).
66
+
```bash
67
+
mvn com.coveo:fmt-maven-plugin:format
68
+
```
74
69
5. Compile the project.
75
-
```bash
76
-
mvn package
77
-
```
70
+
```bash
71
+
mvn package
72
+
```
78
73
79
74
You'll find the bot's `.jar` file inside the `target` folder of the project's root directory.
80
75
81
-
You may also find a pre-built `.jar` [here](https://github.com/TBG1000/Nitro/actions/workflows/main.yml).
76
+
You may also find a [pre-built `.jar` here](https://github.com/TBG1000/Nitro/actions/workflows/main.yml).
82
77
83
78
## Installing
84
-
When creating the bot that will be linked to Nitro's plugin `.jar`, be sure to toggle on the "Server Members Intent" (`GUILD_MEMBERS`) option. If this setting is left off, the bot will not be able to properly function. It will fail to remove privileges from users that were previously Nitro Boosters but have since stopped boosting the server.
79
+
When creating the bot that will be linked to Nitro's plugin `.jar`, be sure to toggle on the "Server Members Intent" (`GUILD_MEMBERS`) option. If this setting is left off, the bot will not be able to properly function. It will fail to remove privileges from users that were previously Nitro Boosters but have since stopped boosting the server. In addition, the (`applications.commands`) scope is required for the slash commands to function.
85
80
86
81
1. Drop the plugin's `.jar` in your server's `plugins` folder.
87
-
2. Restart the server to automatically generate the bot's required files (`config.yml`, `plugin.yml`).
82
+
2. Restart the server to automatically generate the bot's required files (`config.yml`).
88
83
3. Fill in the blanks of the configuration file (`config.yml`). To do this, you'll need the following:
89
84
- A token for your Discord bot which you can get at the [Discord Developer Portal](https://discord.com/developers/docs)
90
85
- The ID of the server in which the bot will be functioning.
91
86
- The ID of the Nitro Booster role.
92
87
- This role can be any role, not necessarily the legitimate "Nitro Booster" role.
93
88
- The ID of the channel in which logs will be sent.
94
-
- The ID of the channel in which users can redeem/remove Nitro Boosting privileges.
89
+
- The ID of the channel in which the bot will alert new Nitro users to redeem their perks.
95
90
- The ID of the channel in which staff members can use the management commands.
96
91
- The command(s) to be executed on the Minecraft server once a user redeems privileges.
97
92
- The command(s) to be executed on the Minecraft server once a user stops boosting the Discord server.
98
93
4. Restart the server once again for the changes to take place. Once your bot goes online, users may start redeeming their privileges in the designated channel.
99
94
100
-
You may look at a sample of the configuration file [below](https://github.com/TBG1000/Nitro/#config).
101
-
You can also find out how to get server, role or channel IDs [here](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID).
95
+
You may look at a [sample configuration file below](https://github.com/TBG1000/Nitro/#config).
96
+
You can also find out [how to get server, role or channel IDs](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID).
102
97
103
98
## Config
104
99
```yml
105
-
# Discord Config stuff
100
+
# Nitro configuration
106
101
enabled: true # Enable discord bot?
107
102
108
103
token: "" # ID of Discord bot token
109
104
server: "" # ID of discord server
110
105
nitro-role: "" # ID of the nitro role
111
106
112
107
channel-alerts: "" # ID of channel where logs from bot are sent
113
-
channel-main: "" # ID of channel where command can be used
108
+
channel-main: "" # ID of channel where bot alerts new Nitro users to redeem perks
114
109
channel-staff: "" # ID of channel where staff can use management commands
115
110
116
111
# List of redemption commands, executed when the user boosts the server
@@ -122,13 +117,7 @@ removal-commands:
122
117
123
118
# List of nitro boosters
124
119
# Format
125
-
# Discriminated Discord username : User Discord ID : Minecraft username : Minecraft username
120
+
# Discord username : User Discord ID : Minecraft username : Minecraft username
126
121
nitro-boosters:
127
122
- ""
128
-
129
-
# List of users banned from redemption privileges
130
-
# Format
131
-
# Discriminated Discord username : User Discord ID
0 commit comments