GithubHelp home page GithubHelp logo

zikeji / eris-somnus Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 590 KB

TypeScript bot framework for Eris.

Home Page: http://eris-somnus.zikeji.com/

License: MIT License

TypeScript 98.14% JavaScript 1.86%
discord-bot discord-eris discord-framework eris-discord eris-discord-bot

eris-somnus's People

Contributors

zikeji avatar

Watchers

 avatar  avatar

eris-somnus's Issues

Database integration implementation?

Any good framework needs a way to define client, guild, user, and per-guild user settings.

I want to be able to do this in an easily typed and extensible way. Preferably using TypeORM so users can plug and play their own database, connection, etc., and have template entities that users can implement on their own.

command module arguments

The preliminary plan is to have argument classes that get referenced in the argument object. I need to figure out to ensure the typing is appropriately intellisensed though.

This would allow people to both use default arguments and define and easily use + type their own arguments.

"monitors" module implementation

Monitors "monitor" any inbound Discord message to apply actions. Need to add some built in filters to the configure and relevant tests.

Scheduled tasks?

Not sure if this is a feature I'll support - but it would be nice to be able to "schedule" a task, such as a reminder, for a later date. And be scheduled in a shard agnostic way that is recoverable (e.g. bot restarts). This might not happen for 1.0.0.

I'm refactoring my bot while writing this library - I have a few scheduled tasks in my bot. If it's relevant I might come up with a solution to this.

Replace debug package with emitted events or another approach.

Considering the package is meant to be used with eris-fleet, the debug messages don't really conform to that standard. In my preliminary testing simply emitting relevant events isn't a great option either because by the time I assign the event listener eris-fleet already loaded SomnusClient. Need to figure out a reliable way to get debug messages to eris-fleet that is both configurable and reliable.

"commands" module implementation

The plan is already to use yargs-parser to let commands support both positional arguments (the default) and option arguments - like you'd see in a CLI program. This module should depend on an underlying monitor as well.

The command module should have a function for checking permissions of the user running the argument. There will be no "permission" levels, the plan is to extend the base module with a predefined check.

e.g.

export default class ModeratorCommand extends SomniaCommandModule {
  async check(message: Message): Promise<boolean> {
    return true;
  }
}

This way you'd just create base classes for each permission type you want. You can handle logic however you please and even create other classes to run to ease the amount of necessary code.

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.