1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-09-28 05:08:59 +00:00
Commit graph

22 commits

Author SHA1 Message Date
diamondburned 05948ac1ec
httputil: Fix incorrect Content-Type header 2022-04-02 22:34:41 -07:00
diamondburned 331ec59dec discord: Refactor interactions and components
This commit gets rid of contain-it-all structs and instead opt for
interface union types containing underlying concrete types with no
overloading.

The code is much more verbose by doing this, but the API is much nicer
to use. The only disadvantage in that regard is the interface assertion
being too verbose and risky for users at times.
2021-11-12 11:38:36 -08:00
Samuel Hernandez 40e1a3757d *: Migrated Go Modules to v3 2021-06-01 19:59:01 -07:00
diamondburned 5252b5af8d httputil: Fix Timeout causing premature cancelation 2021-01-24 22:45:56 -08:00
diamondburned 808dfb28bb httputil: Fixed Multipart writer not closing 2020-12-16 14:08:31 -08:00
diamondburned 525d0bb3f6 API: Move ExecuteWebhookData, add package sendpart for uploads
This commit moved ExecuteWebhookData from package api to package webhook
inside package api. This change required splitting the multipart
abstractions away from package api, so they are now inside package
sendpart in utils.

This commit will break code that uploads anything, as the type name is
now sendpart.File from api.SendMessageFile. The behavior should be the
same as before.
2020-12-16 13:11:11 -08:00
diamondburned d65807ce15 API: Potential rate limit fix for reactions 2020-12-11 17:58:52 -08:00
Maximilian von Lindern 0a8b24339b
API: Added timeout if deadline is after rate limit (#173)
* Rate: don't sleep if sleep exceeds context deadline

* Httputil: add Client.Timeout

* Bot: set default API timeout to 5 minutes

* Rate: reduce calls to time.Now in Acquire

* API: Optimize to use deadline instead of recalculating

Co-authored-by: diamondburned <datutbrus@gmail.com>
2020-11-25 12:08:42 -08:00
diamondburned 1aaa2cbfe2 httputil: Removed debug logs 2020-11-14 15:36:18 -08:00
diamondburned 6cbe95d2b3 State: Fixed erroneous context setting and races in Ready 2020-11-14 15:30:18 -08:00
diamondburned 75df94d9f4 *: Migrated Go Modules to v2 2020-10-28 15:39:59 -07:00
diamondburned 94cca0adca httputil: Fixed unlock of unlocked mutex bug 2020-08-04 14:09:43 -07:00
mavolin 41ce1f389e
make all error messages lowercase 2020-05-16 23:14:49 +02:00
diamondburned (Forefront) 3a43e413d8 Utils: Deprecated client-scoped JSON driver 2020-05-07 20:43:46 -07:00
mavolin e7c1c891fb
Utils: Create Constant for HTTP status code 429 2020-05-07 18:49:07 +02:00
mavolin c7a392f836
Utils: Fix #25 2020-05-07 18:36:15 +02:00
diamondburned (Forefront) cb525ca5c0 Utils: Fixed a nil dereference bug 2020-05-05 15:36:14 -07:00
diamondburned (Forefront) 0c24ac627b Utils: Fixed bug where retries aren't applied options again, causing rate limits 2020-05-05 15:32:28 -07:00
diamondburned (Forefront) a0bccd9c35 API: Added WithContext API, closes #15 2020-05-03 14:02:03 -07:00
diamondburned (Forefront) 2f076c041e Gateway: Migrated functions and variables to other packages, added JSON default codecs 2020-04-23 23:34:08 -07:00
diamondburned (Forefront) 2afe683b7d Utils: Added HTTP drivers 2020-04-19 14:53:53 -07:00
diamondburned (Forefront) be12849668 Changed internal/ to utils/, allowing external imports 2020-04-08 19:28:40 -07:00
Renamed from internal/httputil/client.go (Browse further)