DiscordKit
DiscordKit copied to clipboard
DiscordKitBot: Add basic types + a few other things
The PR adds types for the following:
- Guilds
- Guild Members
- Guild channels
- Text Channels
- Category channels
It also refactors the Message type. All the the types have convenience methods and properties. These changes make it possible to create slightly more complex bots.
This PR also makes some changes to Client:
- The login call will now block the main thread, so that users no longer have to do it manually. This is a potentially breaking change.
- The
restobject is now public, so that advanced users can have access to the discord API, if they so choose. - Restricts the number of logged in clients to 1.
- Fixed an issue where the client would not get logged out properly when exiting. Note that exiting gracefully only works when exiting with
SIGINT, because we need to intercept the exit call. It also does not work while a debugger is attached. - Added a method to login with a token in a file.
Added a few support methods/classes:
asyncMap()andasyncCompactMap()-map()andcompactMap()but asyncPaginatedSequence- AnAsyncSequencethat abstracts away grabbing paginated data.
Changes to docs:
- Added a formatted landing page for docc
- Lots and lots of writing documentation.
There's still a lot of convenience methods to write for Guild, but i decided to make this PR so you can start reviewing it.
Thanks for making the recommended changes. Are there other modifications you'd like to make or can I mark this PR as ready for review?
Yeah go on and review it, I’m not gonna have much time this week to work on stuff, but I’ll get any requested changes done asap.