Discord Bot API - JDA icon

Discord Bot API - JDA -----

A simple discord bot creation API.




This is an important update to make the bots work again!

Updating to this version will break plugins using older versions due to updates with;

SlashCommandEvent > SlashCommandInteractionEvent
Permission.MESSAGE_WRITE > Permission.MESSAGE_SEND
----------, Jul 21, 2022

Now your bot will work with Bungee too! Just add the proper thread handle and the proper command manager.

----------, Jul 21, 2022

Just minor bug fixes. The bot functions do work now however there are some things to keep in mind.

MAKE SURE TO USE INTENTS PROPERLY

That means in the discordapp.com/dev page you need to enable all intents that your bot would be using. Does it interact with members, the member intent, does it do things with presence make sure you enable that intent too.

Good luck and if you need help message in the discord!
----------, Oct 12, 2021

The new bot api now supports slash commands using the default command methods. Make sure your command has a description, and you update your command events.

Some things to note;
Commands new run method
run( @NotNull SlashCommandEvent event)
You can not remove a message from a command.
You MUST use event.getHook().sendMessage().queue() to send a message now.
Double check for null pointers when it asks!

Hope you enjoy the update.
----------, Sep 6, 2021

It has been a long time since there has been an update to the bot api. Several features have been changed about the way the bot is created, adding intents. This also fixes problems with events not triggering.

This bot api will tell discord you are planning on using all intents (aka you will keep track of all data) even if you plan not to. A future plan may be to make it so you can choose which intents to enable yourself.
----------, Apr 11, 2021

This update updates JDA, and replaces the .setStreaming(String game, String url) with .setActivity(String activity, String text) where the activity is one of 4; Playing, Streaming, Listening, or Watching. And the text is the game they're playing, or stream they're watching (For streaming do this! "game : url"), or music they're listening to, or video they're watching.
----------, Jul 4, 2019

When returning in a command that did not have any permissions it wouldn't care if you returned true or false, now if you return true it will delete the command that was sent.
----------, Dec 5, 2018

Sorry about the amount of bugs within the past two days, all should be fixed now! Oh and the slf4j error is gone too.
----------, Dec 3, 2018

Due to an old binding being deprecated there was a problem building the discord bot, that problem should now be fixed.
----------, Dec 3, 2018

Sooo, in adding Maven support I didn't move any of the resource settings files for spigot, bungee, or sponge to the resource folder. Dummy me :p hope the fix works wonders
----------, Dec 3, 2018

Today I have added maven support for compiling the project.
This is a vital update as JDA needs to be updated.
----------, Dec 3, 2018

This update adds a fix to the api enabling on server start.
This also fixes a few other things.
----------, May 8, 2018

The bot was coming online before things were loaded and was causing errors, so a simple fix was to just add a protected build method in the ProgramBot so now it calls that in the Bot constructor at the very end.
----------, May 8, 2018

I goofed when I exported last, I did export and extract a jar with JDA, but it was JDA's source and not JDA with dependencies so it didn't include any of the right files, hopefully this fixes that!
----------, May 8, 2018

Hey guys, today I have the new and updated Bot API, this adds loads of new features and a lot more.

Things that have changed:
  • Package 'com.pzg.www' is now 'com.tjplaysnow'

  • When you create a new bot you will have to do all of this now. This is so it can be independent of Spigot if you want.
    Spigot version:
    Code (Text):
    Bot bot = new Bot("[TOKEN]", "[PREFIX]");
    bot.setConsoleCommandManager(new CommandSpigotManager(this));
    bot.setBotThread(new ThreadSpigot(this));
    Independent version:
    Code (Text):
    Bot bot = new Bot("[TOKEN]", "[PREFIX]");
    bot.setConsoleCommandManager(new CommandConsoleManager());
    bot.setBotThread(new ThreadHandle());
  • The old way of commands is deprecated, now instead of implementing Command you should be extending
    ProgramCommand. The old way will still work for an unforeseen amount of time.

  • The console command has changed as well, the old way still works, but it is suggested to switch to extending
    ProgramCommandConsole.

  • You can change how the bot functions by setting things such as badWordRun, mutedUserRun, or commandRun!

  • The Bot class is now extending the abstract ProgramBot, if you want to use the api but don't want to use the Bot base you can create your very own base.

  • The CommandSpigotManager/CommandConsoleManager are extending the abstract ProgramCommandManager class, and you can very easily create a new ProgramThread if you are building the bot to work in another program as a plugin such as Bungee.

  • The ThreadSpigot/ThreadHandle are extending the abstract ProgramThread class, and you can very easily create a new ProgramThread if you are building the bot to work in another program as a plugin such as Bungee.
----------, May 7, 2018

This update I add the ability to run the api on a Bungee network so you can now make a bot that runs through your entire network! (Thanks to DDarkInferno for helping with this update)
----------, Mar 9, 2018

Literally everything is finished!

In this update:
  • Console Commands are complete
  • Minecraft integration is stream line
    • Console commands will now act as Minecraft Commands while running on a spigot server.
    • Adding an action to run later on a spigot server will just use Bukkit.getScheduler() instead of an alternate thread.
  • JDA Version updated to newest v3.5.1
  • Several other bug fixes.
  • Link now should redirect to Google Drive to download the latest version.
----------, Mar 6, 2018

This is an important update, it fixes the big bug of
IOException Stream Closed

As well, instead of an Action interface it uses Runnables so you can use Lambdas!
----------, Jan 7, 2018

This update includes a new version of JDA, there are some deprecated functions fixed, and the download link has been updated.
----------, Jan 1, 2018

Prior to this the load action couldn't really be used.
In order to use load action do as follows.
Code (Text):
Bot bot;
bot.setLoadAction(new Action() {
  @Override
  public void run() {
    //Do stuff here
  }
});
bot = new Bot("TOKEN", "PREFIX");
----------, Nov 22, 2017

Resource Information
Author:
----------
Total Downloads: 21,641
First Release: Nov 19, 2017
Last Update: Jul 21, 2022
Category: ---------------
All-Time Rating:
25 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings