zikeji / eris-somnus Goto Github PK
View Code? Open in Web Editor NEWTypeScript bot framework for Eris.
Home Page: http://eris-somnus.zikeji.com/
License: MIT License
TypeScript bot framework for Eris.
Home Page: http://eris-somnus.zikeji.com/
License: MIT License
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.
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 "monitor" any inbound Discord message to apply actions. Need to add some built in filters to the configure and relevant tests.
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.