New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Bot support #18
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
someday we’ll have full bot and linux support…
should fix a linting error due to a large switch case
there are now only… 3 warnings!
cryptoAlgorithm
force-pushed
the
bot-support
branch
from
November 24, 2022 11:04
9419c0f
to
eb123b8
Compare
swiftlint on actions seems to have a different ruleset than when running locally
…values cleans up a lot of handling code, and fixes ready event handling for bots too! This is a breaking change and will break even more code in Swiftcord, but fixing that’s a chore for another day.
* patch (logging): add swift-log package * feat (logging): fully migrate RobustWebSocket to swift log also used structured/semantic logging * feat (logging): fully migrate away from OSLog to swift-log
no idea why it was logging the stats at the warning level
user settings update event was also removed as it is depreciated by Discord and no longer sent in the ready object
hopefully this will increase action speed?
patch (robustWebSocket)!: use config struct to get intents
BREAKING CHANGE: rest api methods now return a result or throw (if applicable) instead of an optional
didnt catch this problem as Xcode literally doesn’t care about problems in unused modules
Can you summarise the current progress on this? I am willing to help/contribute but it would be nice to know where you are right now. |
this also facilitates easier retrieval of nested options’ values * feat (command): allow retrieving values of nested options
this ensures there are no erroneous commands left over and only requires one call feat (command): add bulk command overwrite endpoints
…nment patch (client): make rest handler non optional and set/remove the token instead this is in line with discord.js’ behaviour
hopefully prevents retain cycles
I've written a beginner-friendly guide for building a bot with DiscordKit on GitBook! It's still a WIP though, and incomplete. |
BREAKING CHANGE: certain option parameters are no longer passed as arguments to init but as modifiers instead
cryptoAlgorithm
force-pushed
the
bot-support
branch
from
December 16, 2022 08:17
2d5deea
to
54bea4a
Compare
this removes ambiguity in the case where multiple commands of the same name but different type exist
doesn’t appear to have any breaking changes from api v9
feat (interaction): support embed replies
Certain info was extremely outdated after much neglect
also removed LoC badge that stopped working again
Please note that only repos under the SwiftcordApp org are whitelisted. This instance is not designed to be a public instance to prevent misuse.
* 🏷️ feat: add possibly every single endpoints * 💡 fix: update comments for docc * 🏷️ fix: some apis don't have body * lint: fix some linting violations with swiftlint Co-authored-by: cryptoAlgorithm <cryptoalgro@gmail.com>
cryptoAlgorithm
force-pushed
the
bot-support
branch
from
January 25, 2023 14:31
9ca8cbf
to
e51eb8c
Compare
# Conflicts: # README.md
currently only supports action row and button components.
Jokes on you, our API is less stable than our app! ~Discord, probably
This should be merged soon, i don't know why it wasn't done earlier... |
34 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continuation issue: #26 - Bucket list has been moved to an issue for continued tracking after merger of this PR
This PR aims to bring 1st-class bot support to DiscordKit. The checkboxes below outlines what's completed and what's still in the pipeline. The list, as is the bot API, subject to change at any time since this is under intense development and certain parts of the API are still yet to be decided.
Bucket List
NotificationCenter
for messagecreate and ready events
resultBuilder
- supported application command types:chatInput
- Slash commandsuser
- Actions that appear in context menu of usersmessage
- Actions that appear in context menu of messagesresultBuilder
- supported types:subCommand
- A "sub-command" with no optionssubCommandGroup
- A group for nesting other optionsstring
- An option accepting aString
valueinteger
- An option accepting anInt
valueboolean
- An option accepting aBool
valueuser
- An option accepting a user as its valuechannel
- An option accepting a channel as its valuerole
- An option accepting a role as its valuementionable
- An option accepting a @mention as its valuenumber
- An option accepting aDouble
valueattachment
- An option accepting a file attachment as its valueresultBuilder
Guide
WIP beginner-friendly guide for building a bot with DiscordKit is available!