pfist / hiei.js Goto Github PK
View Code? Open in Web Editor NEWA tiny bot framework for discord.js
Home Page: https://hiei.pages.dev
License: MIT License
A tiny bot framework for discord.js
Home Page: https://hiei.pages.dev
License: MIT License
Hiei should handle message components, i.e. buttons and select menus.
Hiei should handle errors with a custom class that extends the native Error object. Read this article from Node Best Practices for guidance.
Slash commands have their own permission system. Permissions should be defined in the command file, and sent along with the command's registry data.
Hiei should include a very simple test bot in the test/
directory that tests and demonstrates all of Hiei's functionality.
Hiei should handle Discord and internal events out of the box. Internal events are those generated by Hiei's command and listener handlers.
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?
Hiei should handle slash, user, and message commands out of the box. There are two ways I could approach this:
isCommand
, isContextMenu
, etc.) to figure out which type to handleOnce hiei is feature complete, it's time to clean up and polish things a bit.
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.
sortBy
function to a new HieiUtil
utility classAdd a utility class called HieiUtil
for storing small, useful utility functions that are used throughout hiei.
Launch a simple docs website with the 1.0 release. Also fill out the Readme before shipping.
The last step when everything else is done: publish to NPM so I can use hiei in my projects.
npm login
np
for easier publishingUseful resources:
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.