Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.

yandwl/LightDrop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

? LightDrop

LightDrop is a lightweight library that allows you to create decorator-based commands with JDA.

Features

  • Creating commands in a method.
  • Adding permissions and permission message.
  • Catch exceptions from commands.
  • Adding global filters to the command's middleware.

Installation

With maven

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>me.neiizun</groupId>
        <artifactId>LightDrop</artifactId>
        <version>latest</version> <!--Replace with the latest version.-->
    </dependency>
</dependencies>

With gradle

repositories {
    maven { url 'https://jitpack.io' }
}
repositories {
    dependencies {
        implementation 'com.github.NeiiZun:LightDrop:latest' // Replace with the latest version.
    }
}

Usage

Hook LightDrop

JDA jda = JDABuilder.createDefault("your token").build();
        
new LightDrop().hook(jda);

Create your first command

public class MyCommand {
    @Command(name = "mycommand")
    public void myCommand(CommandContext context) {
        context.getChannel().sendMessage("Hello " + context.getAuthor().getName()).complete();
    }
}
JDA jda = JDABuilder.createDefault("your token").build();
        
new LightDrop().hook(jda)
    .map(new MyCommand());

Full documentation available here

About

🎇 lightweight JDA command library

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages