Comments (11)
Some additional notes - we'll probably need a new messaging utility. Something like
prompt('input string').then(response => ... ).catch(err => ...);
Which queries the server admin and resolves with their response. The user can respond cancel
to stop the process, which throws the error that the module keys off of to clean up any activity.
We'll also want an optional setUp
method per command that can prompt for keys or other such information. This can be used as an temporary whitelist/blacklist system as well, until a better one can be devised (just exporting an array of IDs?)
from aquarius.
The setup method should probably be a promise as well; the core bot can key off of a resolve to finish adding the module or a reject to send an error message. At this point, it might be prudent to switch the command files to a class system in a similar fashion to ARX-7
from aquarius.
Once this is done, we should bump up the version to 1.0 and release it on NPM
from aquarius.
Thinking the following format might be best - maybe rename setUp
to addServer
?
class Command {
constructor() {
this.name = 'Command';
this.serverWhitelist = [];
this.serverBlacklist = [];
}
setUp() {
return;
}
message() {
return false;
}
helpMessage() {
return;
}
}
module.exports = Command;
I made helpMessage
a function because I think having the option to specialize it per server is nice; for instance, you could rename "karma" to something else per server and have it reflect in the help message.
from aquarius.
As part of this, we need a settings
table - the Schema should probably look like:
id | serverID | command | key | value |
---|---|---|---|---|
x | '3423...' | 'karma' | 'name' | 'torneritos' |
from aquarius.
Actually, it might be worth combining key/value into a single config
JSON field
from aquarius.
I think this might require a few extra database tables; it might be worth reorganizing what we currently have.
from aquarius.
Progress update: Settings and conditional command loading work. I've gotten an initial admin query system up that allows them to set config values, but I still need to add/remove all commands, clear up the messaging a bit, and clear set config values. The permissions system also isn't exposed to the admin yet
from aquarius.
Alright, status update - everything is done except for:
- Update Karma to read from settings
- New server created message
- Create admin command to automatically create Aquarius Roles
from aquarius.
Issues found:
- After adding all commands, a
help
displays an empty list of available commands - Karma is broken (try to retrieve when none is set, the settings is broken when you try to increase)
- Help not displayed for all commands (module not found)
from aquarius.
Done and merged in 8256f76
from aquarius.
Related Issues (20)
- Make a "custom" folder next to bot/global
- Optimize Banlist Check
- Lazy-load Twitch Emotes
- Abstract GitHub Actions
- Twitchmotes are broken
- Add `Verified` to marketing language
- Stats Command HOT 1
- Add Help Aliases
- Add a `.deschtimes list` command
- Guild Member Counts are incorrect
- Config option to boot bot without database HOT 13
- Respond to command calls with invalid / missing arguments HOT 1
- real site? HOT 3
- pride icon HOT 26
- Add Cascade Support to Prisma
- Consistent methods of interacting with a list of options HOT 1
- [8:20 PM] Lav: aqaurius don't show the number of stars in the embeds in #starboard
- Adding reply does not work HOT 1
- Add Deschtimes Stalled At Command
- Incredibly important cat command HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aquarius.