1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-01 04:24:19 +00:00
Commit graph

68 commits

Author SHA1 Message Date
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
Maximilian von Lindern 8e4e48e25e
state: Fix out of bound panic in Messages (#235) 2021-06-24 22:46:27 -07:00
diamondburned 5b328bdab0 shard: Remake shard manager (#226) 2021-06-14 15:22:55 -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
Maximilian von Lindern df5954d2e1
all: Revert incorrect "GuildID" changes (#211) 2021-05-30 14:16:16 -07:00
Maximilian von Lindern d2b70ebfa7 all: Remove deprecated symbols 2021-05-29 22:17:44 -07:00
Maximilian von Lindern 56aaed3d60 State: Fix data race between ready and guild create handler 2021-05-29 12:38:22 -07:00
diamondburned 771591e5eb State: Error out on fetching permission of a channel not in guild 2021-01-05 21:09:16 -08:00
mavolin 7a7a56d613 State: remove redundant error return from NewFromSession 2020-12-15 08:32:18 -08:00
diamondburned c6679dc52c State: Separate Store into smaller interfaces, Cabinet API
This commit refactors the Store interface in State into smaller
interfaces in package store. These interfaces are combined into one
structure called a "Cabinet". The default implementation of those
interfaces have been rewritten in package defaultstore, while the old
no-op implementation stays with the store package.

This commit also omitted several state handlers for user events, as it
is unclear what they are actually structured like.
2020-11-29 16:57:58 -08:00
Maximilian von Lindern 3230916c45
State: don't check store if resource is not tracked through intents (#163)
Partially reviewed; good for the most part.
2020-11-19 10:43:31 -08:00
diamondburned 364f8388ed State: Fixed a mutex copy 2020-11-17 11:01:34 -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
mavolin 6dabffb46c State: fix case where Role would return nil error, even though no role was found 2020-10-18 13:44:37 -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
Maximilian von Lindern 32789bb6e2 *: Separate utils and internal (#129)
* Utils: move package utils/heart to internal/heart

* Utils: move package utils/moreatomic to internal/moreatomic

* Utils: move package utils/zlib to internal/zlib
2020-07-29 16:58:33 -07:00
Maximilian von Lindern 78c36f13cd Discord: Rename Snowflake and Timestamp Valid methods (#128)
* Discord: rename Snowflake.Valid() to IsValid()

* Discord: rename Timestamp.Valid() to IsValid()
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
diamondburned e79132f2c5 State: Breaking API to fix race conditions in store 2020-07-29 16:58:33 -07:00
Tadeo Kondrak d290b0d01c *: Add typed Snowflake IDs (#122)
This PR closes #120.
2020-07-29 16:58:33 -07:00
diamondburned 1c8aaaefcc State: Fixed individual message fetch missing GuildID 2020-07-17 11:35:44 -07:00
diamondburned edb8a46ef2 Gateway: Added intent helpers and more context API support 2020-07-11 12:50:32 -07:00
diamondburned (Forefront) 01021f0902 Fixed a compile bug 2020-06-19 00:59:44 -07:00
diamondburned (Forefront) 88dd0f8995 State now handles MsgCreate's missing Member.User field, some bug fixes
This addresses discord/discord-api-docs#1440.

State documentation has been added, which documents the store and
handlers as well.

Bug fixes include:

- PreHandler being called after the state handler; it is now called
before as documented.
- Minor behavior changes regarding Guild Create events. Refer to State's
documentation.
2020-06-19 00:33:22 -07:00
Maximilian von Lindern 1373e42fe1
State: fix State.Message not working when the message's channel is not found in the Store (#117)
* State: fix State.Message not working when the message's channel is not found in the Store

* State: fix State.Message not working when the message's channel is not found in the Store
2020-06-08 07:30:16 -07:00
Maximilian von Lindern de3d0e2160
Gateway: Split GuildCreateEvent (#116)
* Session: fix event handler loop not getting properly closed

* Implement #113

* Session: move guild events to state

* Session: close hStop
2020-06-06 13:47:15 -07:00
mavolin 943ca00ae5 State: implement #114 2020-06-06 10:24:34 -07:00
mavolin efd2ce4c03 State: reduce times a go routine is spawned 2020-06-06 10:24:34 -07:00
mavolin 41ce1f389e
make all error messages lowercase 2020-05-16 23:14:49 +02:00
mavolin 38b2d4d2b4
State: fix errors not returned 2020-05-16 22:36:46 +02:00
mavolin 6202f53ebb
State: implement #76 2020-05-16 22:15:59 +02:00
diamondburned (Forefront) 5aec467779 State: Fixed incoming messages being backwards in order 2020-05-16 13:05:11 -07:00
diamondburned (Forefront) af682d3f35 API: WithContext documentation 2020-05-03 14:04:09 -07:00
diamondburned (Forefront) a0bccd9c35 API: Added WithContext API, closes #15 2020-05-03 14:02:03 -07:00
diamondburned (Forefront) d4d8172d26 State: Added VoiceStates 2020-04-20 11:03:15 -07:00
diamondburned (Forefront) 7905e2138b Fixed tests that broke because of previous breaking change 2020-04-12 16:24:28 -07:00
diamondburned (Forefront) 3ee307b788 Bot: Added Usager, improved help 2020-04-08 21:25:50 -07:00
diamondburned (Forefront) 6dafb30401 State: Added more wrappers for direct messaging channels 2020-04-07 19:33:56 -07:00
diamondburned (Forefront) 0cd486fc38 Revert "Gateway: State refactored into smaller components"
This reverts commit 11465c62bd.
2020-02-29 18:54:14 -08:00
diamondburned (Forefront) 11465c62bd Gateway: State refactored into smaller components 2020-02-29 18:50:50 -08: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) 79c4c1caca Gateway/State: Added message acking and more user update events for State 2020-02-24 21:50:13 -08:00
diamondburned (Forefront) 1201652aa1 State: Fixed default store messages not working properly 2020-02-21 22:03:44 -08:00
diamondburned (Forefront) 4e9bd53b0f Gateway: Added extra events 2020-02-15 21:29:25 -08:00
diamondburned (Forefront) 0de1e579f3 State: Author* methods now try and use Message.Member 2020-02-12 20:19:24 -08:00
diamondburned (Forefront) 91e213135c State: Changed Self to Me for consistency 2020-02-08 11:48:45 -08:00
diamondburned (Forefront) 5acf01d984 State: Fixed bug where range values are dereferenced incorrectly
https://github.com/golang/go/wiki/CommonMistakes#using-reference-to-loop-iterator-variable
2020-02-07 00:22:41 -08:00
diamondburned (Forefront) cea3e47c27 discord: Fixed APIString method for emoji 2020-01-25 00:05:14 -08:00