Code Monkey home page Code Monkey logo

eris-boiler's People

Contributors

alex-taxiera avatar apacheli avatar dependabot[bot] avatar exorift avatar gitter-badger avatar oshinowo-stephen avatar stickler-ci avatar zematoxic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eris-boiler's Issues

DatabaseManager.js coudn't add client

  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();

Implement Permission

Closely coupled with Command and Orator

Likely need to consider this as CustomPermission (due to a possible system of checking discord permissions)

Parameter improvements

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:

  • name
  • description
  • mandatory (important!)
  • etc?

These can then be used in the help command.

What's mandatory all about?

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).

Implement Command

Command Class should probably be mostly the same

New discord permission verification system? (Orator implications)

Commands via DM breaks

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)

Full Module Path?

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?


I'm pointing here ^ mainly

Now the regex in general could be helpful for identifying the current file as a js, ts, etc:

export const FILE_REGEXP = /^(?!.*\.(?:d|spec|test)\.[jt]s$).*(?=\.[jt]s$)/

But I'm still confused about why we had to trim off the extension and was it necessary?

rotating status is failing

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.

Implement Orator

  • Message processing
  • Closely coupled with Command (we will be trying to execute commands)

Implement Client

  • Client (replacing DataClient) extends Eris.Client
  • Should Client still store Commands?
  • Make sure methods belong (Client#findCommand ? should it be something on a special command storage solution?)

Figure out TSDocs

  • Learn how to TSDoc
  • See if it can publish correctly with lerna repo (doubt)
  • Find alternative publishing methods (can we export to json? that way we could just make an application to read that and make a site)

"Private Commands" are currently broken?

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'
})

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.