Giter Club home page Giter Club logo

combot's Introduction

ComBot

A discord bot which allows the use of external plugins. This bot uses the JDA wrapper created by DV8FromTheWorld

Combot-image

Plugin Downloads

ComBot Website

Bot Discord

For more help or info, join the discord

Download

Get the launcher here and read about setup help here

Features:

  • Choose what features you want added to your bot through the use of user created Plugins.
  • Users can create and distribute plugins for public use
  • Built in permission system which binds permissions to users and roles. Replaceable by other plugins.
  • Restart and Shutdown bot from Discord
  • Add plugins through discord
  • Configuration file
  • Auto Updating: The bot updates itself

Permissions?

Read about permissions here

Commands

  • ~restart
  • ~shutdown
  • ~plugins
  • ~plinfo
  • ~addplugin

Docs

Docs v1.3.2

How to add a plugin:

Navigate to your ~/ComBot/plugins/ folder and add place any plugins you want there. Restarting the bot will enable of the plugins in the folder.

How to make a plugin

Please look at the wiki pages

Note

Plugin creators are responsible for their content

combot's People

Contributors

xdestx avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

combot's Issues

Add simple config reader in util

A lot of config files for the bot follow the same format of a setting on each line, so add a method in Util to make it easier to read from now on

issue with loading plugins

Include .png, .gif, .jpg, .txt for now

As of creating this issue, combot doesn't load images from the jar

Setup change

Have bot use the folder the launcher is in as the base directory

Does not create folder on first run.

PS D:\Discord Bot> java -jar "D:\Discord Bot\ComBotLauncher.jar"
Found config file, loading

====================
MOTD: Message of the Day: Thank you for using ComBot! The newest version is v1.3.3! This version makes the 'plugin' command more simple, and increases the usefulness of the 'plinfo' command. The previous version, v1.3.2, added usage statistics. If there's a problem, please join the discord here and tell me about it: https://discord.gg/kgpguGh
====================
You seem to be missing
check-update and auto-download-update
in your conifg file. I'll set those to true for now, but be sure to add them to your file later.
Check for update: true
Auto-download: true

Using current version
Starting bot...ComBot.v1.3.3.jar
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
        at org.json.JSONTokener.syntaxError(JSONTokener.java:451)
        at org.json.JSONObject.<init>(JSONObject.java:195)
        at org.json.JSONObject.<init>(JSONObject.java:319)
        at com.mdc.combot.permissions.DefaultPermissionManager.readPermissionsFile(DefaultPermissionManager.java:208)
        at com.mdc.combot.permissions.DefaultPermissionManager.getPermissionManager(DefaultPermissionManager.java:220)
        at com.mdc.combot.ComBot.<init>(ComBot.java:99)
        at com.mdc.combot.BotLauncher.startBot(BotLauncher.java:81)
        at com.mdc.combot.BotLauncher.main(BotLauncher.java:76)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at com.mdc.combot.launcher.ComBotLauncher.loadComBot(ComBotLauncher.java:160)
        at com.mdc.combot.launcher.ComBotLauncher.main(ComBotLauncher.java:114)
Aug 10, 2020 12:03:16 PM com.mdc.combot.BotLauncher startBot
INFO: Starting...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".
SLF4J: Defaulting to no-operation MDCAdapter implementation.
SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details.
javax.security.auth.login.LoginException: The provided token is invalid!
        at net.dv8tion.jda.core.entities.impl.JDAImpl.verifyToken(JDAImpl.java:276)
        at net.dv8tion.jda.core.entities.impl.JDAImpl.verifyToken(JDAImpl.java:214)
        at net.dv8tion.jda.core.entities.impl.JDAImpl.login(JDAImpl.java:161)
        at net.dv8tion.jda.core.JDABuilder.buildAsync(JDABuilder.java:662)
        at net.dv8tion.jda.core.JDABuilder.buildBlocking(JDABuilder.java:701)
        at net.dv8tion.jda.core.JDABuilder.buildBlocking(JDABuilder.java:730)
        at com.mdc.combot.ComBot.login(ComBot.java:663)
        at com.mdc.combot.ComBot.start(ComBot.java:425)
        at com.mdc.combot.BotLauncher.startBot(BotLauncher.java:84)
        at com.mdc.combot.BotLauncher.main(BotLauncher.java:76)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at com.mdc.combot.launcher.ComBotLauncher.loadComBot(ComBotLauncher.java:160)
        at com.mdc.combot.launcher.ComBotLauncher.main(ComBotLauncher.java:114)
Aug 10, 2020 12:03:17 PM com.mdc.combot.BotLauncher startBot
SEVERE: Unable to log in! Yikes! (Invalid token?) The provided token is invalid!

Logging

Create some sort of logger that makes it easier to look at the console and also tracks time, and saves to ~/ComBot/logs/.log or something

Change any system.outs / e.printStack t

Shutdown error

Since the shutdown command / restart command uses a message listener, it causes errors when it shuts down because plugins still had listeners registered. Do something to stop this from happening.

Add usage stats

Not many for now, but it would be interesting to see how many ComBot instances are alive at a given time.

Permission system

The permission system is intended to function in an inheriting style, yet it doesn't

Where bot.admin.restart and bot.admin.shutdown gives shutdown and restart perms,
bot.admin.* should give both (but it doesn't)

Only * works right now

Add permission command

Default command to assign permissions

~perm <role/user/everyone> [rolename/@user] <perm>

and have it save too.

Note: This is for the default perm manager only

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.