alex-taxiera / eris-boiler Goto Github PK
View Code? Open in Web Editor NEWA Discord Bot boilerplate using JavaScript and the Eris library
License: GNU General Public License v3.0
A Discord Bot boilerplate using JavaScript and the Eris library
License: GNU General Public License v3.0
If you create a connection and create more than 1 table after, it connects to the DB on every function, racking up connections.
async addClient (id) {
if (await this._select({ table: 'guild_settings', columns: 'id', where: { id } })) return
return this._insert({ table: 'guild_settings', data: { id } })
.then(() => { this._insert({ table: 'guild_toggles', data: { id } }) })
}
if always true, cuz get empty array [] if no match. So it always return undefined and never _instert();
Command Class should probably be mostly the same
New discord permission verification system? (Orator implications)
First things first, where is the assignment?
eris-boiler/lib/data-client/index.js
Line 28 in 5e3ba25
Closely coupled with Command and Orator
Likely need to consider this as CustomPermission (due to a possible system of checking discord permissions)
Returning something in a CommandAction breaks if the command was sent via a DM
06/24 21:07:58 | error processing command response: TypeError: channel.permissionsOf is not a function
at Orator.createMessage (/home/a/Projects/apollo-bot/node_modules/eris-boiler/lib/orator/index.js:72:33)
at Orator._processCommandResponse (/home/a/Projects/apollo-bot/node_modules/eris-boiler/lib/orator/index.js:321:18)
at /home/a/Projects/apollo-bot/node_modules/eris-boiler/lib/orator/index.js:128:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
An error was presented:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/satori/DarkMagician/apps/magician/src/commands/ping' imported from /home/satori/DarkMagician/apps/magician/node_modules/@hephaestus/core/dist/index.js
Did you mean to import /home/satori/DarkMagician/apps/magician/src/commands/ping.ts?
But unsure of its behavior... possibly reinstallation without similar path-transformation packages causes this cause this was fine before. Still, at the current fact why don't we give it the full path including the extension?
Now the regex in general could be helpful for identifying the current file as a js
, ts
, etc:
Right now command parameters are just lame strings you can pass to display in the help command.
Params probably need to be expanded to objects with a few props such as:
These can then be used in the help command.
This will help us do command parameter length validation, need to be careful with it though. It should be illegal to have any mandatory params after an optional one.
When checking required parameter length, we only need to care about the number of mandatory params, this could be set on the Command itself within the constructor (as could the previously mentioned validation).
Any way to use a "Private Command" is current broken... you can see examples and methods below
Stack:
02/25 20:49:21 | error processing command response: TypeError: channel.permissionsOf is not a function
at Orator.tryCreateMessage (/home/whoastonic/poke.moe/poke.core/node_modules/eris-boiler/lib/orator/index.js:64:33)
at Orator._processCommandResponse (/home/whoastonic/poke.moe/poke.core/node_modules/eris-boiler/lib/orator/index.js:307:18)
at /home/whoastonic/poke.moe/poke.core/node_modules/eris-boiler/lib/orator/index.js:119:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Methods tried:
import { PrivateCommand } from 'eris-boiler'
export default new PrivateCommand({
name: 'test',
description: 'A test command',
run: () => 'Testing, command...'
})
import { Command } from 'eris-boiler'
export default new Command({
name: 'test',
description: 'A test command',
options: {
dmOnly: true,
guildOnly: false
},
run: () => 'Testing, command'
})
for some reason, my dev bot is rotating to null/undefined status, this is throwing no errors and giving a Playing {{blank}}
log every time it is "switching" unknown cause.
Orator doesn't know what to do when the bot doesn't have webhook permissions during a webhook response.
That error should be handled and a message should be sent asking for webhook permission.
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.