diamondburned
80b1dc3831
discord: Refactor interaction commands and components
...
This commit is an amalgamation of the following local commits:
- Fix UnknownCommandOption unmarshaling
- Add missing ButtonComponent.UnmarshalJSON
- Fix ButtonComponents Style unmarshaling
- Remove debug logging
- SelectComponent.ComponentEmoji
- Fix incorrect CommandOption interface
- Switch to pointer types for interfaces
- Remove CommandOptionMeta
- Less verbose CommandOption type names
- Fix unused CommandInteractionOption
- Remove ComponentInteractionData
2021-11-09 13:09:22 -08:00
diamondburned
accb2fc52b
example/undeleter: Fix AddSyncHandler
2021-11-03 15:43:07 -07:00
samhza
bfb644c124
api: Add CurrentApplication ( #282 )
...
* discord/api: support fetching bot's Application
* Update api/application.go
Co-authored-by: diamondburned <diamond@arikawa-hi.me>
Co-authored-by: diamondburned <diamond@arikawa-hi.me>
2021-10-03 13:31:48 -07:00
diamondburned
76c25835b7
bot: Move bot to utils
2021-09-18 00:39:34 -07:00
samhza
dc92845315
discord: move Interaction over; update api.CommandCreateData ( #274 )
...
- Moved gateway.InteractionCreateData to discord.Interaction, now
gateway.InteractionCreateData is a struct that wraps
discord.Interaction.
- Split InteractionData into CommandInteractionData and
ComponentInteractionData.
- Renamed ButtonInteraction to ComponentInteraction.
- Updated api.CommandCreateData to add new fields.
- Update Component types' Type() methods to pointer receivers.
2021-09-09 16:06:44 -07:00
Maximilian von Lindern
955bb2aad2
api: Make some InteractionResponseData fields nullable ( #256 )
...
* api: make InteractionResponseData.Content, .Embeds, and .Components nullable
* Fix examples
* Remove test code
* fix commands example
2021-08-08 13:20:54 -07:00
Maximilian von Lindern
101fe46313
api: Add missing slash command endpoints ( #252 )
...
* api: add missing slash command endpoints
* fix examples
* api: Remove Original prefix from Client.OriginalInteractionResponse,
EditOriginalResponse, and DeleteOriginalResponse
2021-08-03 11:44:20 -07:00
samhza
37b8871c65
api: Update sending/editing messages for v9 ( #230 )
...
api.{Send,Edit}MessageData and their equivalents in package api/webhook
have been updated to add some fields added in Discord API v9.
(webhook.Client).EditMessage now also returns a message, because that
endpoint returns a message on success.
2021-06-17 23:32:11 -07:00
diamondburned
5b328bdab0
shard: Remake shard manager ( #226 )
2021-06-14 15:22:55 -07:00
Samuel Hernandez
40e1a3757d
*: Migrated Go Modules to v3
2021-06-01 19:59:01 -07:00
Scott
10c8837000
api: Finalized buttons implementation ( #200 )
...
* all: Added Components fields to message-related types
* discord: Documented Reactions field
* discord: Implement fix for Component
* gateway: Added User and Message fields to InteractionCreateEvent
* api: Made InteractionResponseData fields optional for UpdateMessage responses
* api: Deprecated and updated interaction response types
* gateway: Update optional interaction event fields
* discord: Added ComponentWrap for json unmarshalling
* state: Update components on MessageUpdate
* Updated buttons example
2021-05-29 21:32:33 -07:00
Chan Wen Xu
c880cb2fc8
interaction: Implement buttons
2021-05-29 14:16:44 -07:00
diamondburned
3713c9d404
Bot: Added Run(); updated examples
2021-02-23 21:40:44 -08:00
diamondburned
0ab9d901e1
Example: Fixed simple bot intents
2021-02-07 16:22:38 -08:00
Matthew Penner
7c3374543e
Discord: Add basic support for slash commands
2021-01-27 10:44:14 -08:00
diamondburned
f4635803ee
Examples: Added Gateway intents and comments
2020-11-19 12:03:14 -08:00
diamondburned
273fcf1418
Bot: Added subcommand aliases and better setup API
...
This commit adds subcommand aliases as well as additional code in
HelpGenerate to cover for both subcommand and command aliases.
A breaking change is that {,Must}RegisterSubcommandCustom methods are
now replaced with normal {,Must}RegisterSubcommand methods. This is
because they now use variadic strings, which could take 0, 1 or more
arguments.
This commit also allows AddMiddleware and similar methods to be given a
method directly:
sub.Plumb(cmds.PlumbedHandler)
sub.AddMiddleware(cmds.PlumbedHandler, cmds.plumbMiddleware)
This change closes issue #146 .
2020-11-12 19:02:52 -08:00
diamondburned
75df94d9f4
*: Migrated Go Modules to v2
2020-10-28 15:39:59 -07:00
Maximilian von Lindern
1585797b52
*: Linting and typo fixes ( #134 )
...
* Linting and typo fixes
* Linting and typo fixes
* revert comma fix
2020-07-29 16:58:33 -07:00
mavolin
ba4b224168
handler: move package from /handler to /utils/handler
2020-07-29 16:58:33 -07:00
mavolin
41ce1f389e
make all error messages lowercase
2020-05-16 23:14:49 +02:00
diamondburned
795a69ca7d
Bot: Added EditableCommands
2020-05-14 18:52:15 -07:00
diamondburned
fe950de9e0
Examples: Fixed up advanced_bot to make it up to date
2020-05-14 18:01:48 -07:00
diamondburned (Forefront)
7d683a2ace
Examples: Updated advanced_bot to the new API
2020-05-14 14:20:23 -07:00
diamondburned (Forefront)
4e4ebde93a
Gateway: Deprecated Wait(), fixed ReconnectOP bug
2020-04-12 11:06:43 -07:00
diamondburned (Forefront)
09ae9fbb07
Bot: Added a Prefixer API which breaks the old Prefix string API
2020-04-06 13:27:33 -07:00
diamondburned (Forefront)
f0102d765f
Gateway: Added a retry limit
...
State: Event handlers now handle all of Ready's Guilds field
Session: Added Wait, which blocks until SIGINT or Gateway error
2020-02-29 18:13:58 -08:00
diamondburned (Forefront)
d8530154a5
Examples: Fixed undeleter.go Self() -> Me()
2020-02-23 20:42:31 -08:00
diamondburned (Forefront)
7e602a4e79
Examples: updated
2020-01-26 01:08:53 -08:00
diamondburned (Forefront)
1c25ccbf8e
Bot: added data return types
2020-01-26 01:06:54 -08:00
diamondburned
aadcbd0767
Added middleware features into package bot. ( #3 )
...
* Middleware nameflag
* Completed M-Middleware feature
* Changed Namer/Descriptor API to CanSetup API
2020-01-23 19:17:03 -08:00
diamondburned (Forefront)
c6155d63dc
Added the Wait API into Handler and example
2020-01-22 19:52:07 -08:00
diamondburned (Forefront)
7e73f00eb9
Fixed bug where ParseContent interface methods won't return a proper error
2020-01-20 20:25:47 -08:00
diamondburned (Forefront)
ce0bd07977
Changed undeleter to be more clear
2020-01-19 10:09:26 -08:00
diamondburned (Forefront)
7f06d88d0f
Updated heartbeat behavior
2020-01-18 22:22:03 -08:00
diamondburned (Forefront)
28228a60f5
Ported rfrouter over
2020-01-18 22:06:00 -08:00
diamondburned (Forefront)
5b0687bcd3
Added state example
2020-01-18 13:40:09 -08:00
diamondburned
2dc983d243
Added simple example
2020-01-17 14:29:13 -08:00