This commit makes it so that all sharded state.State instances will have
its own cabinet store on construction. This ensures that when a State is
reconnected, a Ready event won't wipe the cabinet for all other states.
This commit also fixes a bug with the Shard() and FromGuildID() getters.
* Gateway: Fix Gateway.Open overwriting the context argument
* WSUtil: Remove max context timeout in Websocket.Dial
* WSUtil: Use Websocket.Timeout if a no-deadline context is given to .Dial
* WSUtil: Add doc to Websocket.Timeout clarifying that it must not be changed after use
* discord: update permission constants
* discord: update MessageType constants, add ephemeral field to Attachment
Renamed ApplicationCommandMessage to ChatInputCommandMessage and add
ContextMenuCommand. Add the ephemeral field to Attachment.
* discord: add version field to Command
* gateway: remove ApplicationCommandUpdateEvent
52f1824451
- 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.
* feat(discord): add banner & accent_color field to User struct
* feat(discord): use type Color (uint32) for User.AccentColor
* discord: change field name to Accent
* api: Adapt Client.EditMessage, SendEmbedReply, and SendMessageReply to take in
multiple embeds
* api: Fix incorrect use of Client.EditMessage
* api: Make EditMessage omit empty content or embeds from payload
This change skips events that are unknown while the bot reconnects. This
is an event that is particularly rare as it requires unimplemented
events being called in the time before a bot's HELLO -> RESUME events
are called. This change explicitly returns unknown events as a special
time defined in wsutil/op.go and ignores them from reaching gateway/op.go
* Update Sticker struct & add missing fields
* Remove PreviewAsset field from Sticker
Co-authored-by: Maximilian von Lindern <maximilian.v.lindern@gmail.com>
* Update discord/message.go
Co-authored-by: Maximilian von Lindern <maximilian.v.lindern@gmail.com>
* Change Sticker.User type to *User
Co-authored-by: Maximilian von Lindern <maximilian.v.lindern@gmail.com>
* Update discord/message.go
Co-authored-by: Maximilian von Lindern <maximilian.v.lindern@gmail.com>
* Sticker types start from 0
Co-authored-by: Maximilian von Lindern <maximilian.v.lindern@gmail.com>
* Change Sticker.SortValue type to *int
Co-authored-by: Maximilian von Lindern <maximilian.v.lindern@gmail.com>
* Remove extra space
* Un-ignore Sticker.Tags field
Co-authored-by: Maximilian von Lindern <maximilian.v.lindern@gmail.com>
Co-authored-by: Maximilian von Lindern <maximilian.v.lindern@gmail.com>