Skip to content

koply/koply-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koply Core Async Bot Base

Build Status LICENSE stars

Simple bot base includes CommandHandler and Config system.

How To Create A Command

@CommandName("ping")
@CommandDescription("Pong!")
public class PingCommand extends Command {

    @Override
    public void handle(CommandParameters cmd) {
        cmd.getTextChannel().sendMessage("Pong!").queue();
    }
}

Optionally you can use final class and final handle method. This will be nicer.

@CommandName: Command's name for usage.

@CommandDescription: Command's description for help command.

@OwnerOnly: This command usable for only bot owners.

Config.json Syntax

"prefix": "$": For command prefix.

"token": "INSERT-BOT-TOKEN-HERE": Bot token.

"owners": ["INSERT-YOUR-ID-HERE"]: Bot owner id's.

"cooldown": 5000: Cooldown for regular users. The bot owners are doesn't affect the cooldown.

Group Names And Descriptions

"info": "Bilgilendirme--Bilgi alabileceğiniz komutlar bulunur.": The key named as 'info' for 'info' commands package. The group name is before then '--'. The group description is after then '--'.

"nulldescriptiontext": "Açıklama girilmedi.": This line for non-descriptioned commands.

Versions Changelog

v2.0

* Added file database (json) system.
* Fixing some bugs.