DiscordKitBot: Add basic types + a few other things#31
DiscordKitBot: Add basic types + a few other things#31Candygoblen123 wants to merge 42 commits intoSwiftcordApp:mainfrom
Conversation
|
There's still a lot of convenience methods to write for |
cryptoAlgorithm
left a comment
There was a problem hiding this comment.
This PR is really amazing and adds so many missing features, thanks!
I understand that it is still a work in progress, and so far it seems very nice. I've left some comments which you could take as suggestions.
Due to the sheer massiveness of this PR, I have spent a reasonable effort reading thru most files but might've missed something.
Co-authored-by: CryptoAlgo <64193267+cryptoAlgorithm@users.noreply.github.com>
|
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. |
|
|
||
| /// The url to jump to this message | ||
| public var jumpURL: URL? { | ||
| get { |
There was a problem hiding this comment.
This get { clause is redundant, should be removed to resolve the lint warning
| public let interactionID: Snowflake | ||
| /// The guild member that sent the interaction | ||
| public var member: Member? { | ||
| get { |
There was a problem hiding this comment.
The get keyword should be removed here as well to resolve the following lint warning.
The PR adds types for the following:
It also refactors the
Messagetype. 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:restobject is now public, so that advanced users can have access to the discord API, if they so choose.SIGINT, because we need to intercept the exit call. It also does not work while a debugger is attached.Added a few support methods/classes:
asyncMap()andasyncCompactMap()-map()andcompactMap()but asyncPaginatedSequence- AnAsyncSequencethat abstracts away grabbing paginated data.Changes to docs: