Skip to content

Instantly share code, notes, and snippets.

@Ovyerus
Last active May 10, 2019 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ovyerus/9d36d13320a6e7c4baacb71d1eb73456 to your computer and use it in GitHub Desktop.
Save Ovyerus/9d36d13320a6e7c4baacb71d1eb73456 to your computer and use it in GitHub Desktop.

Plans for Clarisa

  • Move to Erisa org and either keep name, or rename to @erisa/micro.
  • Essentially micro for bots.
  • Either single function export or programmatic instantiation.
    • Programmatic returns an instance of Erisa - still wraps single function.
  • Function export gets called with clarisa or @erisa/micro on the command line.
  • Ability to use command system without programmatic API
    • Either export as exports.commandSystem = true or config file?
    • Sets up a folder as a directory to load commands from.
    • Commands follow single function export like main.
    • Take name from filename (or function if it's named?)
    • Add props to function fn.foo = 'bar' for extras, or object?
import {send, MainFunction} from 'clarisa'; // or whatever name we end up on.

export const token = 'token';

export default async msg => {
    if (msg.content === '!ping')
        return 'Pong!';  // Can return a string for simpole replies.
    else if (msg.content === '!pong')
        return /* await */ send({
            description
        });  // Function for more advanced sending (embeds, images).
             // Should we make it return something, or have it take in msg as an argument and then return the sent message?
             // (ie. msg.createMessage)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment