1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-27 09:12:53 +00:00
Commit graph

564 commits

Author SHA1 Message Date
diamondburned 8fab526775
Create FUNDING.yml 2020-12-11 16:48:36 -08:00
Terra Brown 545149cd5a Discord: (*Member).Mention proper format (#164) 2020-11-18 15:55:28 -08:00
diamondburned 0cb65e88a8 API: Fixed incorrect DeleteAllReactions endpoint 2020-11-14 16:32:27 -08:00
diamondburned 38d7af77f9 json: Fixed a race condition with erroneous JSON streams 2020-11-14 14:21:05 -08:00
diamondburned 1202a17359 README: Updated badges 2020-11-02 17:31:29 -08:00
diamondburned 65092354c0 Gateway: Added missing GuildCreateEvent handler 2020-11-01 18:58:23 -08:00
diamondburned a25250d959 wsutil: Reset SendLimiter after Dial 2020-11-01 10:09:41 -08:00
diamondburned 33eb8ef315 wsutil: Added super verbose logs 2020-11-01 09:44:02 -08:00
diamondburned 06fbcfcfd1 CI: Fixed typo
My high level of competence is very arguable.
2020-10-31 17:30:28 -07:00
diamondburned 29c69c8ffe wsutil: Added possibly missing Reset cases and more debug logs 2020-10-31 15:52:55 -07:00
diamondburned 834a9d6104 CI: Fixed invalid unit test command 2020-10-31 12:04:55 -07:00
diamondburned 3fdf2f076f wsutil: Added graceful close checking 2020-10-30 13:58:15 -07:00
diamondburned 169cf7d9a3 Gateway: Fixed race in test Fatal 2020-10-30 11:15:32 -07:00
diamondburned aa6432f48e {,Voice}Gateway: Refactored Closing
This commit refactors both wsutil, the normal Gateway and the Voice
Gateway to have better closing behavior, which should assume less and
cover edge cases completely.
2020-10-30 11:08:29 -07:00
diamondburned 55de271118 CI: Use Alpine's build-base instead 2020-10-29 13:28:31 -07:00
diamondburned 0201145917 CI: Enable cgo for the race detector 2020-10-29 13:28:27 -07:00
diamondburned 09d34a8d88 CI: Added missing gcc for race detector 2020-10-29 13:28:21 -07:00
diamondburned 20b539754e CI: Enabled race detector in tests 2020-10-29 13:28:15 -07:00
diamondburned f88d4e4b1e Gateway: Fixed wsutil build fail regression 2020-10-29 11:32:30 -07:00
diamondburned 7668fe940c wsutil: Websocket wrapper thread safety for simpler Conn impl
This commit removes the thread safety requirement that Conn
implementations must satisfy. It moves the mutex guards as well as the
multiple close wrapper over to the Websocket wrapper instead.
2020-10-29 11:24:45 -07:00
diamondburned 160a4e6606 wsutil: Fixed data races involving getters 2020-10-28 19:00:59 -07:00
diamondburned 16a408bf30 wsutil: Refactored and decoupled structures for better thread safety 2020-10-28 10:19:22 -07:00
diamondburned 6c332ac145 {Voice,}Gateway: Fixed various race conditions
This commit fixes race conditions in both package voice, package
voicegateway and package gateway.

Originally, several race conditions exist when both the user's and the
pacemaker's goroutines both want to do several things to the websocket
connection. For example, the user's goroutine could be writing, and the
pacemaker's goroutine could trigger a reconnection. This is racey.

This issue is partially fixed by removing the pacer loop from package
heart and combining the ticker into the event (pacemaker) loop itself.

Technically, a race condition could still be triggered with care, but
the API itself never guaranteed any of those. As events are handled
using an internal loop into a channel, a race condition will not be
triggered just by handling events and writing to the websocket.
2020-10-22 10:47:27 -07:00
diamondburned 91ee92e9d5 Gateway: Fixed a race condition on ReconnectOP 2020-10-21 22:42:16 -07:00
diamondburned 86795e42a6 Session: Fixed a potential race condition on Close 2020-10-21 22:42:16 -07:00
Maximilian von Lindern 397d288927
API: fix errors in message pagination and streamline changes with other pagination methods (#150)
* API: fix faulty pagination behavior

This fix fixes a condition which lead to all messages getting fetched if the limit was a multiple of 100, instead of just the limit.

* API: add NewestMessages

* API: clarify MessageAfter docs

* API: adapt paginating methods for guild, member and message reaction to match the style of message's pagination methods

* API: return nil if no items were fetched

* API: remove Messages and Rename NewestMessages to Messages
2020-10-19 07:47:43 -07:00
diamondburned dec39c4c2d API: Fixed Messages{Before,After} fetching incorrectly beyond 100s 2020-10-18 22:14:49 -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
diamondburned 1bec57523d Gateway: GuildSubscribeData should omit empty Channels map 2020-10-17 03:18:50 -07:00
diamondburned 86dd05da9e Gateway: Fixed empty Query on RequestGuildMembersData broken 2020-10-16 02:17:59 -07:00
mavolin 647efb8030 Discord: add Mention method to mentionable Snowflakes 2020-09-24 11:54:45 -07:00
diamondburned 64ab8c4f30 Bot: Fixed trailing backticks causing out of bound panic 2020-08-29 22:09:58 -07:00
mavolin 5acf9f3f22 Discord: fix invalid role mention generation 2020-08-24 16:32:51 -07:00
mavolin 7d5cc89ff0 API: add KickWithReason 2020-08-22 10:05:37 -07:00
diamondburned 6b4e26e839 wsutil: Improved internal code 2020-08-20 14:15:52 -07:00
diamondburned fd818e181e Gateway: GuildFolderID is now a signed int because Discord 2020-08-19 21:54:20 -07:00
diamondburned 87c648ae1d Discord: ParseSnowflake now uses ParseUint 2020-08-19 21:53:22 -07:00
diamondburned 3312c66515 Voice: Made EventLoop a valid struct value instead of nil pointer 2020-08-19 21:32:40 -07:00
diamondburned de61fd912d wsutil: Made PacemakerLoop valid as zero-value 2020-08-19 21:30:57 -07:00
diamondburned f0c73f4c99 State: Ready events now automatically reset the state 2020-08-18 10:20:48 -07:00
Maximilian von Lindern a7e9439109
Discord/API: implement changes to permission, allow and deny fields (#141) 2020-08-17 17:10:43 -07:00
diamondburned af7f413cea Gateway: Clarified GuildMemberListGroup.ID docs 2020-08-14 21:13:48 -07:00
diamondburned c819b56170 Gateway: Added a custom GuildFolderID type 2020-08-14 18:13:35 -07:00
diamondburned eb46a89e6c Gateway: Fixed GuildFolder.ID unmarshaling 2020-08-14 17:57:06 -07:00
diamondburned d888a5a7ac Bot: Added better middleware documentation 2020-08-11 17:31:29 -07:00
diamondburned 3db68bcb0e Bot: Allow hanging quotes if command has a custom parser 2020-08-11 13:44:32 -07:00
diamondburned 94cca0adca httputil: Fixed unlock of unlocked mutex bug 2020-08-04 14:09:43 -07:00
mavolin 2a032ebfab Discord: add watching activity 2020-08-03 17:46:04 -07:00
diamondburned 77b1b08bce Heart: Better synchronization on close methods 2020-07-30 12:44:50 -07:00
mavolin 362929fad5 Webhook: fix incorrect order of parameters 2020-07-29 20:03:24 -07:00