ShindouMihou/Velen

The Future of Velen

Opened this issue · 0 comments

What is this about?

The development of Velen has been stalled since a newer, more updated, and better framework is being completed instead which aims to replace Velen's slash command functionality. If you want to use a better slash command framework then I highly recommend using Nexus instead which performs so much faster and better especially in command synchronization, code appearance, and so forth. You can view examples of my new framework @ Examples.

Although still in the alpha phase, it has many if not all the current functionality of Velen and improvised upon. I'd like to thank everyone who helped out with Nexus for allowing this framework to flourish as well as it is now. 👋🏻

Do I have to move frameworks now?

NO! Not at all! Velen will be maintained in a weaker sense. It will receive patches that fix known vulnerabilities and be upgraded to the latest Javacord versions. If you do not need Velen to take advantage of the very latest features of Javacord at point-blank then using Velen is all good for you since I will keep updating it to the newest Javacord version without any worry, ensuring that it is always compatible with Javacord!

Why are you abandoning Velen?

The reason why I am abandoning Velen for Nexus is because of one thing: I don't believe in the future of hybrid and message commands anymore and the system of Velen doesn't fit well with me since to use the newer system of Velen, you have to copy over all the files that are .velen which is ugly and tiring for every change.

Nexus takes this away by using an OOP-form of generating commands that do not use ugly builders and give you access to the information of your command within arms reach. A simple Nexus command can be created by using this:

@NexusAttach
public class PingCommand implements NexusHandler {

    private final String name = "ping";
    private final String description = "Replies with a pong."

   @Override
    public void onEvent(NexusCommandEvent event) {
        event.respondNow().setContent("Pong!").exceptionally(ExceptionLogger.get());
    }

}
public class MainClass {

   private static final Nexus NEXUS = Nexus.builder().build();
   private static final int TOTAL_SHARDS = 2;

   public static void main(String[] args) {
      NEXUS.createCommandFrom(new PingCommand());
      new DiscordApiBuilder()
                .setToken(System.getenv("token"))
                .setAllIntents()
                .setTotalShards(TOTAL_SHARDS)
                .addListener(NEXUS)
                .loginAllShards()
                .forEach(future -> future.thenAccept(discordApi -> NEXUS.getShardManager().put(discordApi))
                .exceptionally(ExceptionLogger.get()));

        NEXUS.getSynchronizer()
                .synchronize(TOTAL_SHARDS)
                .thenAccept(unused -> System.out.println("Discord is now updated with all the commands."))
                .exceptionally(ExceptionLogger.get());
      
   }

}

It also has a more advanced middleware system that is far simpler and easier to work with than on Velen, its codebase is also easier to maintain with most built-in features such as rate-limiters, authentication (user, perms, roles) being written as middleware to speed up responses. All of these reasons combined with the fact that slash commands and interactions are the future makes me think that Nexus is the better choice for the future.

I do feel horrible for abandoning the Discord bots that are using Velen heavily but I do wish for the developers behind those bots to experience a better framework than what Velen has to offer and maintaining this framework is kind of futile for such, as such, Velen will be unmaintained from hereon.

Conclusion

This doesn't mean that Velen will no longer receive updates that will bring it up-to-date with the latest Javacord versions. I will continue to make Velen up-to-date with Javacord as much as possible and also patching any vulnerabilities if found, but that's about the limit.