discordoo v1.0.0-dev.t1685847367.c421ffb
WARNING
THIS LIBRARY IS UNDER DEVELOPMENT! Parts of the stuff described here is not done yet, and we are just planning to implement it. You can find out more information about the development in our Discord.
Philosophy
At Discordoo, we rethought the concept of a Discord bot and came to the conclusion that a Discord bot does not differ much from an HTTP REST backend in its essence. The key similarity between a backend and a Discord bot is that both respond to requests. The difference is that a backend responds to HTTP requests, while a Discord bot responds to Discord gateway events or even Discord's HTTP requests via Discord's HTTP API. Therefore, we took and brought familiar concepts from backends to the library for Discord like dependency injection, providers, controllers, etc.
While there are already projects like Necord, they use libraries created long ago like discord.js and eris under the hood, which due to problems with architecture cannot offer the same as us. Also, such projects are mostly based on NestJS, which is just not designed for such things. We decided to fix it all.
Getting Started
Process to installation guide or API reference.
Planned features
- Waifoo — a framework for creating discord bots based on Discordoo (commands, other features).
- Kawaioo — a library / nestjs microservice that will allow you to interact with the Discordoo ShardingManager over TCP and UDP, to create your own scalable Rest API for the bot.
- Voice support — at this moment, the library does not support voice.
- Microservices — injection of microservices into the DiscordApplication that can communicate with each other.
Release milestone
A complete description of everything that must be in Discordoo to be released
Release deadline: When it's ready.
Sharding
- Implement sharding
- Shards spawning
- use processes for shards
- use workers for shards
- use clusters for shards (unfortunately, windows not supported)
- Shards communication
- Shards must be able to communicate in fast and scalable way
- Shards must use hello/identify algorithm
- Shards must use heartbeat algorithm
- Shards must be able to send, receive and handle CACHE_OPERATE messages
- Shards must be able to send errors to ShardingManager, manager must handle these errors
User-land APIs
- User must be able to spawn shards
- User must be able to restart specified shard(s)
- User must be able to destroy shard(s)
- User must be able to get shard(s) statistics
- v8 statistics
- custom statistics
- events per gateway shard per second
- common statistics (guilds in cache, users in cache, channels in cache, etc.)
- User-friendly sharding APIs in sharding instances
Gateway
- Implement gateway
- Implement gateway provider
- Connecting to gateway
- Reconnecting/resuming in common/emergency cases
- Receive and send etf encoded messages
- Receive and decode zlib-compressed messages
- Multi gateway shards support in one WebSocketManager instance
- Processing events/s smoothing/limiting
- Handling gateway rate limits
- Send events to WebSocketManager, and then to GatewayProvider
- Gateway must be able to restart only specified shard(s)
Rest
- Implement rest
- Implement rest provider - rest request (like constructor) & rest provider (performs requests and handles rate-limits optionally)
- Requests
- Sending requests to Discord
- Responses
- Unified response form for library internals
Rate-limits
- Rest must smartly-handle rate-limits using
remainingheader - Rest must synchronize global-rate-limit between shards on one machine
- Rest must smartly-handle rate-limits using
Cache
- Implement cache
- Implement cache provider
- Library must be able to store something
- Library must be able to delete something from cache
- Library must be able to check cache size
- Library must be able to sweep cache
- Library must be able to iterate cache
- Library must be able to operate with cache in a different shards from one shard
- Caching policies
- Cache must handle GlobalCachingPolicy
- Cache must handle MessagesCachingPolicy
- Cache must handle GuildsCachingPolicy
- Cache must handle GuildMembersCachingPolicy
- Cache must handle ThreadMembersCachingPolicy
- Cache must handle ChannelsCachingPolicy
- Cache must handle EmojisCachingPolicy
- Cache must handle RolesCachingPolicy
- Cache must handle PresencesCachingPolicy
- Cache must handle UsersCachingPolicy
- Cache must handle OverwritesCachingPolicy
- All the policies listed above must be able to handle custom caching functions
SID - still in development
Entities (discord structures)
- Must be extendable
- Anti monkey-patch defence
- Implement Guilds (SID)
- Implement Messages
- Implement Channels (SID)
- Implement Members
- Implement Emojis
- Implement Stickers
- Implement Roles
- Implement Presences
- Implement Reactions
- Implement Users
- Implement Interactions (SID)
User-land APIs
- Collection
- Wrapper
- BitField wrappers
- Entities managers
- EntitiesManager
- EntitiesCacheManager
- ApplicationGuildsManager (SID)
- ChannelMessagesManager/ApplicationMessagesManager (SID)
- GuildChannelsManager/ApplicationChannelsManager (SID)
- GuildEmojisManager/ApplicationEmojisManager (SID)
- GuildRolesManager/ApplicationRolesManager (SID)
- GuildPresencesManager/ApplicationPresencesManager
- GuildMembersManager/ApplicationGuildMembersManager (SID)
- ThreadMembersManager/ApplicationThreadMembersManager (SID)
- MessageReactionsManager/ApplicationReactionsManager
- UsersManager (SID)
Contributing
Feel free to create a PR, but check if there is an existing one. See Contributing Guide.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago