This plugin was developed for the sole use in my own plugins/plugins I contribute to. It is a basic discord API without any extra BS! I do not suggest downloading this plugin if you do not own my plugins.
- Native Minecraft Version:
- 1.16
- Tested Minecraft Versions:
- 1.8
- 1.9
- 1.10
- 1.11
- 1.12
- 1.13
- 1.14
- 1.15
- 1.16
- Source Code:
- https://github.com/HMJosh/DiscordBotAPI
- Donation Link:
- https://www.paypal.me/joshsplugins
Why did I make this instead of using DiscordSRV?
DiscordSRV does not support bungee use. I really needed bungee support with my plugin to function properly. So I'm not stealing heat or anything. I need a reliable and compatible API that supports my needs. However, DiscordSRV is an amazing plugin. Check it out here (https://www.spigotmc.org/resources/discordsrv.18494/)
!!!!!LOOK HERE!!!!!
Creating a Discord Bot and getting its Bot-Token for the config:
- Create an application at https://discordapp.com/developers/applications/
- On the application's page, go to the "Bot" tab, click "Add Bot", and confirm.
- Scroll down to the bottom of the bot page and enable Server Members Intent.
- Click the copy button under "Token" on the bot tab.
- Copy and paste the token to your settings.yml
- Invite the bot to your discord server using the bot link
- done
Features:
- Account Link/Unlink with Minecraft.
- Easy link process.
- That's it!
Commands:
- /discord - main plugin command. Fully customizable messages
- /discord link - sends you instructions to link your account to discord.
- /discord unlink - sends you instructions to unlink your account from discord.
Permissions:
- discordbotapi.command.discord
- discordbotapi.command.discord.link
- discordbotapi.command.discord.unlink
Note:
- All API Methods/commands/permissions are identical to the server/bungee version. Just drag and drop the plugin into either plugin folder and enjoy.
- Do not reload this plugin. I will add a reload command for messages later. But don't reload the plugin. Restart your server once you made your changes.
Screenshots:
When the account is linked:
Not linked:
/discord link
All messages are fully customizable:
Code (Text):Discord:
PM-Command-Only: '%[email protected]%, The link command can only be ran in PM"s.'
No-Code-Generated: 'There is not code generated for this account. You must run /discord link in game to get started.'
Wrong-Code: 'That code does not match our records. Please try again.'
Account-Linked: 'You account has been linked! At any time, use "/discord unlink" in game to unlink your account.'
Game:
Prefix: '&7[&cDiscordBot&7]'
Commands:
No-Permission: '%prefix% &cYou do not have permission to use this command.'
Player-Only-Command: '&cConsole can not run this command.'
Discord:
Not-Linked:
- ''
- '&3Join our discord! &e(invite link)'
- ''
Linked:
- ''
- '&aYour account (&e%player%&a) is linked with discord (&e%discord_author_name%#%discord_author_discriminator%&a)'
- '&c(your invite link here)'
- ''
Sub-Commands:
Link:
Not-Linked:
- ''
- '&e%player%&a, you can link your account on our discord!'
- '&e(invite link)'
- ''
- '&aInstructions:'
- '&a- P.M &e%discord_bot_name% &awith this command:'
- '&e %command_prefix% link %code%'
- '&a- That"s it!'
Linked:
- ''
- '&aYour account (&e%player%&a) is linked with discord (&e%discord_author_name%#%discord_author_discriminator%&a)'
- '&c(your invite link here)'
- ''
Unlink:
Not-Linked:
- ''
- '&e%player%&a, your account is not linked on our discord!'
- '&e(invite link)'
- ''
Linked:
- ''
- '&aYour account (&e%player%&a) has been unlinked with discord (&e%discord_author_name%#%discord_author_discriminator%&a)'
- '&c(your invite link here)'
- ''
Developers:
Want to use this plugin for discord integration?
Maven:
Add this to your POM:
Code (HTML5):<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>Usage:Code (HTML5):<dependency>
<groupId>com.github.HMJosh</groupId>
<artifactId>DiscordBotAPI</artifactId>
<version>Tag</version>
</dependency>
This API simply builds you a JDA bot instance.
First you should check if the plugin is installed before you start calling methods from DiscordBotAPI
(same goes for bungee plugins)Code (Java):if(Bukkit.getPluginManager().getPlugin("DiscordBotAPI") != null){
//initalize classes here
}
Then you can use the DiscordBotAPI methods:
It's good to use my methods for registering events:Code (Java):DiscordBotAPI.getJDA()... //The jda object
If not, register your listeners with jdaCode (Text):DiscordBotAPI.plugin.registerEvent(this, new DiscordMessageListener());
//This is so I can handle stuff in the future. I.E Disable listeners that cause issues... etc
Account Manager:Code (Java):DiscordBotAPI.getJDA().addEventListener(listenerClass);
This is used for the linking process of accounts. You can use any method here, but I suggest you ONLY use the get methods to not cause issues with linking/unlinking accounts. Let my plugin do the work. (getUUID, and getDiscordID)
It's pretty simple. No extra events and such. Just link and unlink. Wants something added? Let me know!Code (Java):DiscordBotAPI.getAccountManager()...

DiscordBotAPI 1.1.1
Discord to server/bungee bridge. Used with plugins that depend/softdepend this resource