1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-01 12:34:28 +00:00
Commit graph

1110 commits

Author SHA1 Message Date
Maximilian von Lindern f334491dee
api: Mutate validated embeds from discord.Embed.Validate (#271) 2021-08-24 11:23:49 -07:00
rigormorrtiss 1e9eb4a473
api: *Client.ActiveThreads returns ActiveThreads struct (#270)
* v3: api: *Client.ActiveThreads returns ActiveThread struct

* Apply suggestions
2021-08-20 02:27:53 -07:00
diamondburned 64bd519156 state: Store Threads as channels 2021-08-19 20:58:38 -07:00
Maximilian von Lindern b61179d188 api: Remove Client.Kick and rename .KickWithReason to .Kick 2021-08-18 11:31:16 -07:00
rigormorrtiss eece98903a
discord: Add Banner & Accent fields to User (#267)
* 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
2021-08-16 23:48:36 -07:00
rigormorrtiss b253a5659b
discord: Add Invitable field for threads (#268) 2021-08-16 22:37:33 -07:00
diamondburned fe1f7aa201 CI: Increase testing time 2021-08-16 19:23:32 -07:00
Maximilian von Lindern 525e8d527b api: More multiple embed support for send functions (#266)
* 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
2021-08-16 02:26:25 -07:00
Maximilian von Lindern 19335e5050 api: Pointerize return types for consistency
Pointerize Client.Command, .GuildCommand, .CommandPermissions, and .EditCommandPermissions for consistency
2021-08-15 12:29:30 -07:00
Maximilian von Lindern 244570c280
api: Add support for the X-Audit-Log-Reason header (#259)
* api: add support for the X-Audit-Log-Reason header

* api: inline reason parameter, where data struct has a single field
2021-08-15 18:33:33 +02:00
Nat dbfc49fb08
API: Fix Client.{Guild,}Command() (#264) 2021-08-14 22:27:22 -07:00
rigormorrtiss e97dcb750c
discord: Add omitempty option to Attachment.ContentType (#263) 2021-08-12 11:45:48 -07:00
Juby210 21888dcfc2
discord: Add missing ContentType to Attachment (#262) 2021-08-11 18:16:50 -07:00
starshines f7880b91ee
discord: Add select component type (#260) 2021-08-10 14:02:30 -07:00
bumbread 3753794fad readme: Fix non-compiling example (#258) 2021-08-08 15:02:35 -07:00
diamondburned b1cae78096 bot: Stop message handling on middleware errors 2021-08-08 13:53:24 -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 c00567599b
api: Threads (#257)
* api/gateway: Implement threads

* discord/api: rename PermissionOverwrites fields to Overwrites

* discord: rename Minutes to ArchiveDuration

* discord: Rename ArchiveDuration constants

Co-authored-by: diamondburned <datutbrus@gmail.com>
2021-08-08 13:19:15 -07:00
Hamza Ali 0d7774bd6a
gateway: Skip unknown events while reconnecting (#255)
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
2021-08-03 18:00:31 -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
Starshine System 127c6776ac discord: add missing command option types 2021-08-03 09:07:09 -07:00
Starshine System 42aa73a592 gateway: change InteractionOption.Value to json.Raw, add helper methods 2021-08-03 09:07:09 -07:00
rigormorrtiss 2fe1150d01
discord: Update Sticker struct, add missing fields (#251)
* 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>
2021-08-02 16:16:06 -07:00
Maximilian von Lindern ce4bd67f17
discord: Add missing webhook fields (#250)
* discord: add missing webhook fields
* discord: add missing ,omitempty tags on Webhook
* discord: add missing ,omitempty tags on Webhook
2021-08-02 16:14:34 -07:00
Starshine System 9651328b74
discord: Raise embed description limit to 4096 characters (#243) 2021-07-11 13:19:54 -07:00
EvieDelta 29a3094a75
gateway: Possible Close/Send deadlock bug (#244)
when websocket send error happens in wsutil.(Websocket).SendCtx

Co-authored-by: EvieDelta <no public email>
2021-07-11 10:56:18 -07:00
diamondburned af35c03b8e voice: Fix race condition, see #237 2021-06-30 00:19:30 -07:00
diamondburned d4c66d4971 api: Omitted SearchData redundant option type 2021-06-26 17:04:00 -07:00
samhza 7bc2be1498
api: Add search endpoint (#236)
Co-authored-by: Terra Brown <superloach42@gmail.com>
2021-06-25 12:29:14 -07:00
Maximilian von Lindern 8e4e48e25e
state: Fix out of bound panic in Messages (#235) 2021-06-24 22:46:27 -07:00
diamondburned 6c349d9750 shard: Unwrap Shard in ForEach 2021-06-24 21:20:58 -07:00
diamondburned d66f667f28 bot: Fix Start incorrect error checking 2021-06-24 21:10:56 -07:00
samhza 354199383a
api: Remove Client.SendText (#234)
SendMessage(a, b) is equivalent to SendText(a, b) so SendText is
redundant.

Programs using SendText can be updated with

    $ gofmt -r 'c.SendText(a, b) -> c.SendMessage(a, b)' -w .
2021-06-22 17:48:16 -07:00
diamondburned 17dbccccc3 bot: Clarify unexported *Context field 2021-06-22 16:10:30 -07:00
trybefore 917459611d bot: Wait catch SIGTERM (#233)
Signed-off-by: Daniel Boman <daniel.boman@pm.me>
2021-06-22 13:42:45 -07:00
samhza 1b12057e51
discord: Make OverboundError.Error() have a pointer receiver (#232) 2021-06-18 00:15:02 -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
Germano Eichenberg 94090b92ff
discord, gateway: Add IsPending to Member & SupplementalMember (#231) 2021-06-17 13:40:57 -07:00
diamondburned da7c6c6dba gateway: Allow custom SessionID 2021-06-14 15:23:08 -07:00
Hamza Ali 134f49d00f discord: Add Flags field to InteractionResponseData 2021-06-14 15:23:08 -07:00
diamondburned 68313eb872 discord: Fix Channel not unmarshaling 2021-06-14 15:23:08 -07:00
diamondburned 5b328bdab0 shard: Remake shard manager (#226) 2021-06-14 15:22:55 -07:00
Samuel Hernandez af3bedc472 api: allow interaction responses to include files
function RespondInteraction doesn't return a message.
systemPkgs
2021-06-10 16:58:10 -07:00
diamondburned b8f452828d ci: Test building examples 2021-06-10 16:58:07 -07:00
diamondburned ba49bff80a state: Fix voice state removal condition
This commit addresses issue #220.
2021-06-10 16:52:31 -07:00
Maximilian von Lindern c8e7eff04e discord: rename ActivityTimestamp to ActivityTimestamps 2021-06-06 13:12:24 -07:00
Maximilian von Lindern 2875635532 bot: remove deprecated Subcommand.SanitizeMessage 2021-06-06 13:12:02 -07:00
Maximilian von Lindern f1f4f06979
*: Rename error types to have Error suffix (#215) 2021-06-06 12:40:24 -07:00
Maximilian von Lindern a808b52f00
state: Add paginating State.Messages (#213)
* Store,State: Add update param to all store.XXXStore.XXXSet methods

* State: add paginating Messages

* Store: Fix test error

* store: merge shouldPrependMessage and shouldAppendMessage into single messageInsertPosition
2021-06-03 21:39:49 +02:00
Samuel Hernandez 40e1a3757d *: Migrated Go Modules to v3 2021-06-01 19:59:01 -07:00