This commit adds Interaction webhook server support directly into the
library.
Bots can now support both receiving events through the Discord gateway
and the Interaction webhook handler within the same library.
This reverts commit 7e49429.
The initial goal of this addition is to be used for interaction
followups, but the interaction event already comes with the application
ID.
The addition was also not done properly, and no invalidation on event is
done.
This reverts commit 2aaa2002d8.
The initial goal of this addition is to be used for interaction
followups, but the interaction event already comes with the application
ID.
The addition was also not done properly, and no invalidation on event is
done.
This commit adds these methods into *state.State:
- (*State).CurrentApplication
- (*State).CurrentApplicationID
This should make interacting with API functions that require AppIDs much
more pleasant.
This commit adds an Unmarshal method into CommandInteractionOptions. It
is probably the first commit to break the rule of keeping package
discord simple.
The goal of this rationale is that package discord should continue
prioritizing convenience and ease of use by providing small, helpful
additions without being oversized.
This method, while it uses reflect, is actually fairly small in
implementation. Its functionality should be kept to a bare minimum and
as such will not cover every single use case (but should cover most).
This commit adds the Connect and Wait methods into session. This gives
the user a way to block the program until the session runs into an error
or the given ctx is done.
In most cases, Connect is useful when combined with
signal.NotifyContext, and so Connect is preferred over Open.
This commit adds the StickerURLWithType methods into Sticker and
StickerItem types. No Lottie support is added yet, because I'm not sure
what the filename format for that is.
This reverts commit 660d9893e1.
The commit introduces regular incorrect reconnections. It will be
tracked in another branch and re-merged later once fixed.