Giter Site home page Giter Site logo

danclay / eris-fleet Goto Github PK

View Code? Open in Web Editor NEW
41.0 41.0 18.0 1.18 MB

Cluster management for Discord bots using the Eris library.

Home Page: https://danclay.github.io/eris-fleet

License: MIT License

TypeScript 88.04% JavaScript 11.96%
bot clustering discord eris nodejs sharding

eris-fleet's People

Contributors

brainicism avatar danclay avatar dependabot-preview[bot] avatar dependabot[bot] avatar theessem avatar tom-beijner avatar

Stargazers

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

Watchers

 avatar  avatar

eris-fleet's Issues

incorrectly typing id parameters as numbers

Describe the bug
context:

public async fetchUser(id: number): Promise<any> {

public async fetchGuild(id: number): Promise<any> {

public async fetchChannel(id: number): Promise<any> {

public async fetchMember(guildID: number, memberID: number): Promise<any> {

possibly more; unsure

JavaScript doesn't handle discord snowflake IDs properly as numbers; see
image

These types should be changed to strings (or bigints though thats just silly because they would need to be converted into a string instantly)

This library should also perhaps be tested? testing would've seen that this is an issue

Version N/A

To Reproduce N/A

workerID of undefined

It seems like letting the bot run I get the error of "TypeError: Cannot read property 'workerID' of undefined' occasionally appear. I don't have a consistent way of testing this other than letting the bot run.
Reference
Note: The bot was running on Ubuntu

Shutdown stops after failure inside shutdown function

Describe the bug
A clear and concise description of what the bug is.

Version
0.3.3

To Reproduce
Shutdown a worker with some non-functional code inside the the shutdown function

Expected behavior
The kill timeout to kick in and kill the worker forcefully

shard undefined

Describe the bug
when errors are logged, the log that is showen is 2|Counting | Cluster 6, Shard undefined | [DEPRECATED] Member#permission is deprecated. Use Member#permissions instead
Version
0.3.5

To Reproduce
log an eris-fleet error
Expected behavior
my expected behavior is that the shard that the error ocurrd on will show as in this log
2|Counting | Cluster 6, Shard 6 | [DEPRECATED] Member#permission is deprecated. Use Member#permissions instead

shutdowns giving "TypeError: Cannot redefine property: _token"

When using shutdownCluster or totalShutdown an error occurs:
TypeError: Cannot redefine property: _token

This error is caused by a bug in eris. The bug is fixed in the dev branch of eris. Use abalabahaha/eris#dev. Once eris's dev branch is merged into the master branch eris-fleet's eris dependency will be updated.

Custom logging

Decent library so far but I'd like to be able to disable built-in logging so I can receive logging events on the main file (ie. index.js) and pipe them into my custom logging functionality.

So instead of something like this:
image
Or any sort of general logging like shard ready, it'd send a JSON object to an event (via IPC or just by using an event handler on the main Fleet) that can then be handled appropriately.

EDIT: Re clarifying that I'm suggesting a JSON object to be passed instead of just the errors that come right now.

Add more IPC shardstats properties

I would like to see users and guilds to be added to the shardstats function.

Edit: I mean the properties of the shards in the getStats function.

Incorrect amount of users on clusters

Describe the bug
The cluster is showing 1 when the shard itself is not in a guild

Version
v0.2.4

To Reproduce
Console log the clusters users amount

Expected behavior
Should display 0

How do I have the events emitted by Fleet in their own files?

Hi, got a question.

My event loader works for Discord events however I'm not sure how to access the events emitted by Fleet since const Admiral = new Fleet(...) is in index.js and cannot be accessed elsewhere.

I want them in separate files since I use classes which means I can access bot, ipc etc and can use webhooks for Discord logging. It also enables me to post stats received from the stats event to my own API.

Solved by danclay on Discord.

Shard disconnect error with undefined

Describe the bug
Shard disconnect with an error which is undefined, which later the shard resumes.

Version
v0.2.4

To Reproduce
I don't have a way to reproduce it as it seems it just happens while running.

Expected behavior
Show the actual error

Screenshots
Reference

Additional context
The issue occurred on a Ubuntu machine I have not tested if this occurs on my Windows machine.

Workers stuck and never connect

Workers sometimes launch after the connect message is sent.
Workers are launching after the connect message is sent from the queue being executed. This causes the log to get stuck at "shards spread."

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.