Giter Site home page Giter Site logo

p1fr0b's Introduction

Setup

API key

For security reasons, the API is stored in resources/IDS_PRIVATE which is included in the .gitignore. For testing purposes, you will have to create a new discord bot and populate resources/IDS_PRIVATE in the format described below. Whitespace on either side of the semicolon is ignored.

Public IDs

By default, the bot reads resources/IDS_PUBLIC for public IDs. But for testing the bot on your own server, you're going to have to change these values. To do this, please copy the file into resources/IDS_PUBLIC_DEV and change the values in there. Then, when running the bot on your own server, pass in the command line argument IDS_PUBLIC_DEV.

API_KEY : ABCDE.ABCDE

Responses Manager Module

See response-manager/Readme.md for an explanation on the setup needed for the ResponseManager module. This can be ignored if you do not intend test or modify the ResponseManager.

Building

The build script is build.gradle.kts which is written with the Kotlin DSL for Gradle. You can use the run build target (gradle run) for testing and debugging, but the shadowJar target is used for deployment. Make sure to also set IDS_PUBLIC_DEV for Program Arguments.

Structure

Modules

Discord bots are represented by a Bot object, which have very limited functionality until modules are added to it. Modules represent a set of features that the bot will have. See the IModule interface for the most generic definition of a module. When creating a new module, it is recommended that you extend BotModule or ListenerModule if the module is based on receiving events from the JDA instance.

Commands

Commands can be added to the bot by calling GeneralCommandModule.addCommands(). The general command module instance can be obtained by calling Bot.resolveDependency(GeneralCommandModule). The Command data class is defined here.

Contributing

Contributors who have submitted accepted pull requests will be given the Developer role in DotaPack.

It would be appreciated if commits followed the style followed these guidelines, but pull requests may still be accepted even if they do not.

Code Style

Code style is loosely defined, but it would be appreciated if it matched the existing code. The only specification I will mention is that the maximum line length is 100

Documentation

Add Javadocs for all the classes and functions added that are not inherited from another class or interface.

Add a ModuleID annotation for any new Modules.

p1fr0b's People

Contributors

c1fr1 avatar balduvian avatar shiverisbjorn avatar

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.