Giter Club home page Giter Club logo

hiei.js's People

Contributors

pfist avatar

Watchers

 avatar  avatar

hiei.js's Issues

Handle command permissions

Slash commands have their own permission system. Permissions should be defined in the command file, and sent along with the command's registry data.

Tasks

  • Send permissions when registering commands
  • Test permissions for slash, user, and message commands

Command registration

I'm still deciding how to approach this. Should Hiei handle command registration or leave it for the bot to deal with?

I would like to explore the possibility of automating command registration. Essentially: if local commands are different from remote commands, register commands again to keep them updated.

Tasks

  • Move sortBy function to a new HieiUtil utility class
  • Cleaner comparison
  • Better variable names

Documentation

Launch a simple docs website with the 1.0 release. Also fill out the Readme before shipping.

Readme

  • Title and description
  • Features
  • Get started
  • Links
  • Contributing

Docs

  • Choose site framework
  • Setup repo
  • Customize design
  • Deploy to Cloudflare Pages

Welcome

  • Get started

Guide

  • Slash commands
  • Message commands
  • User commands
  • Listeners

Reference

  • HieiClient
  • SlashCommand
  • MessageCommand
  • UserCommand
  • Listener

Polish things up

Once hiei is feature complete, it's time to clean up and polish things a bit.

Tasks

  • Ensure consistent variable and parameter names throughout the framework
  • Clean up comments (either remove all or comment every function with a consistent style)
  • Run final test to make sure everything works

Add a simple test bot

Hiei should include a very simple test bot in the test/ directory that tests and demonstrates all of Hiei's functionality.

Tasks

  • Test client options
  • Test commands
  • Test listeners

Handle events

Hiei should handle Discord and internal events out of the box. Internal events are those generated by Hiei's command and listener handlers.

Tasks

  • Handle Discord events
  • Handle internal events

Automatic command registration

After one evening working with Hiei, it's pretty clear my command registration isn't working well. I made a bot with 2 commands, and even if I don't change them, Hiei still registers them every time the bot logs in.

I should look at what's going on and see if I can make it work more consistently. If not, I should just drop it in favor of the separate registration script method described in the discord.js guide. The only problem to solve then will be: where does the script exist? Can I package it with Hiei somehow, or will I have to create a new one for every bot?

Tasks

  • Support command options
  • Support subcommands
  • Support default permissions
  • Support custom permissions

Handle components

Hiei should handle message components, i.e. buttons and select menus.

Tasks

  • Handle buttons
  • Handle select menus

Add utility class

Add a utility class called HieiUtil for storing small, useful utility functions that are used throughout hiei.

Tasks

  • Sort an array of objects by key in descending order
  • Get an array of JS files found in a directory and its subdirectories

Handle commands

Hiei should handle slash, user, and message commands out of the box. There are two ways I could approach this:

  1. Create separate handlers for each command type
  2. Create a single command handler that uses conditional logic (isCommand, isContextMenu, etc.) to figure out which type to handle

Tasks

  • Handle slash commands
  • Handle user commands
  • Handle message commands

Handle errors

Hiei should handle errors with a custom class that extends the native Error object. Read this article from Node Best Practices for guidance.

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.