Ethien Duckett
456692da93
API: stay within the boundaries of messageIDs ( #160 )
2020-11-11 11:07:30 -08:00
Maximilian von Lindern
cc1975988d
API: abstract away boundary limits for DeleteMessages ( #159 )
...
remove boundary limits for DeleteMessages
rename deleteMessages to deleteMessagesRaw
use constant instead of limit literal
add min helper func
rename utils.go to math.go
2020-11-10 15:34:05 -08:00
mavolin
d8ccaf78c3
API: rename SendMessageData.MessageReference to SendMessageData.Reference and fix omit issues
2020-11-03 10:35:45 -08:00
mavolin
f9a59ac2e7
Discord: add doc to MessageReference
...
Add addtiontional type information to MessageReference as found in discord/discord-api-docs#2053
2020-11-03 10:25:57 -08:00
mavolin
aff386402f
Gateway: remove GuildSubscriptions from IdentifyData
...
With the requirement of intents on Gateway v8, the guild_subscriptions field has no effect, and is therefore removed
2020-11-03 10:18:04 -08:00
mavolin
eb118dc1d6
Discord: add Message.ReferencedMessage and InlinedReplyMessage
2020-11-03 10:14:53 -08:00
mavolin
e3c85094a7
API: add MessageReference
2020-11-03 10:14:53 -08:00
mavolin
88258b51c2
replace usage of discordapp.com with discord.com in docs
2020-11-03 10:14:53 -08:00
mavolin
661f96da03
API: add RepliedUser to AllowMentions
2020-11-03 10:14:53 -08:00
mavolin
5716c78d97
API: replace use of whitelist with more inclusive synonyms
2020-11-03 10:14:53 -08:00
diamondburned
0d219428a0
README: Updated badges
2020-11-02 17:32:00 -08:00
diamondburned
615b52de57
Gateway: Added missing GuildCreateEvent handler
2020-11-01 18:58:03 -08:00
diamondburned
a3aa490024
wsutil: Reset SendLimiter after Dial
2020-11-01 10:12:35 -08:00
diamondburned
bd1696ef65
wsutil: Added super verbose logs
2020-11-01 10:12:31 -08:00
diamondburned
abd5bba9c3
CI: Fixed typo
...
My high level of competence is very arguable.
2020-10-31 17:29:59 -07:00
diamondburned
a46d3c2c8d
wsutil: Added possibly missing Reset cases and more debug logs
2020-10-31 15:54:51 -07:00
diamondburned
bbd4e57cb1
CI: Fixed invalid unit test command
2020-10-31 12:05:11 -07:00
diamondburned
63310fdc95
wsutil: Added graceful close checking
2020-10-30 13:54:35 -07:00
Maximilian von Lindern
607250ae55
Gateway: Added reconnect timeout; fixed UA ( #154 )
...
* Gateway: use gateway version 8
* API: remove old v0.0.1 version tag
* Discord: fix typos
* Gateway: add timeout
* Gateway: revert to returning errors on ReconnectCtx
2020-10-30 13:41:04 -07:00
diamondburned
f3372e016a
Gateway: Added missing intents in tests
2020-10-30 12:00:41 -07:00
diamondburned
2a2244c965
Gateway: Use API v8 version instead of its own v6
2020-10-30 11:24:10 -07:00
diamondburned
0ead315aa3
Gateway: Fixed race in test Fatal
2020-10-30 11:15:58 -07:00
diamondburned
16c1658163
{,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:02:37 -07:00
diamondburned
9c1088bf7c
Voice: Fixed test error caused by Gateway API changes
2020-10-29 13:27:32 -07:00
diamondburned
108913b701
Discord: OverwriteType to accept numbers both stringed and not
...
Because Discord is so incompetent that they can't even handle 1s and 0s
in JSON, we can't really predict when they quote a number and when they
don't, because as it turns out, the documentation does not cover all
cases.
This commit adds a JSONUnmarshaler into OverwriteType to always trim the
quotes around then parse the number manually.
2020-10-29 13:25:03 -07:00
diamondburned
21ac7972fa
Discord: Renamed guild_const.go to guild_consts.go for correctness
2020-10-29 13:21:02 -07:00
diamondburned
39782b5c88
CI: Use Alpine's build-base instead
2020-10-29 13:09:49 -07:00
diamondburned
e6dc57aa04
CI: Enable cgo for the race detector
2020-10-29 13:06:27 -07:00
diamondburned
3933bfb813
CI: Added missing gcc for race detector
2020-10-29 12:46:34 -07:00
diamondburned
a4a9a24424
CI: Enabled race detector in tests
2020-10-29 11:38:54 -07:00
diamondburned
2afcd1bc87
Merge Gateway regression fixes from v1
2020-10-29 11:32:54 -07:00
diamondburned
f88d4e4b1e
Gateway: Fixed wsutil build fail regression
2020-10-29 11:32:30 -07:00
diamondburned
8d21c5f43f
Merge wsutil bug fixes and changes onto v2
2020-10-29 11:25:09 -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
9b4b707070
Handler: Use a free list over a linked list
2020-10-28 23:55:39 -07:00
diamondburned
9899f6073b
Bot: Added automatic Intents detection from handlers
...
This commit adds automatic Intents detection into package bot. When the
Start function is used, the intents will be OR'd after running the
options callback.
This commit also breaks the old "AddIntent" methods to rename them to
"AddIntents" for correctness.
2020-10-28 22:49:18 -07:00
diamondburned
ef48d686cd
Handler: Changed to a linked list instead of a slice-backed map
...
This change should slightly improve the performance of the handler
container.
A rough benchmark was written and tested; the source code is at
https://gist.github.com/diamondburned/c369d13efda5c702a0e59874deee64bd .
2020-10-28 22:37:38 -07:00
diamondburned
b7b8118d0b
State: Fixed breaking change from previous Gateway change
2020-10-28 19:47:22 -07:00
diamondburned
b8e4b2cf56
Gateway: Added an Event to Intents map for convenience
2020-10-28 19:44:04 -07:00
diamondburned
c00d31ce30
Gateway: Added missing MessageReactionRemoveEmojiEvent constructor
2020-10-28 19:39:18 -07:00
diamondburned
fd16db1385
Gateway: Fixed MessageReactionRemoveEmoji not having Event suffix
2020-10-28 19:31:43 -07:00
diamondburned
33e7abd4db
Merge wsutil fix from v1 into v2
2020-10-28 19:03:10 -07:00
diamondburned
160a4e6606
wsutil: Fixed data races involving getters
2020-10-28 19:00:59 -07:00
diamondburned
75df94d9f4
*: Migrated Go Modules to v2
2020-10-28 15:39:59 -07:00
diamondburned
6183068c4d
Discord: Fixed incorrect OverwriteType string rules
2020-10-28 15:34:14 -07:00
diamondburned
f9f254148f
API: Fixed rate limiting tests
2020-10-28 15:23:47 -07:00
diamondburned
795cbdef53
Discord: Fixed redundant and broken OverwriteType
2020-10-28 14:49:30 -07:00
diamondburned
196cab2105
API: Better documented ModifyGuildWidgetData
2020-10-28 14:43:49 -07:00
diamondburned
994ddca1e1
Discord: Updated the Presence struct to be smaller
...
This commit omits a few fields in the Presence struct in accordance to
the new v8 structures.
Removed roles, premium_since, and nick
2020-10-28 14:39:44 -07:00
diamondburned
2af51c9a5a
API: V8 breaking rate limit changes
...
This commit updates Retry-After to be seconds-accurate instead of the
previous millisecond-accurate. Another issue (#153 ) is opened to get a
more accurate number, which is in the JSON body instead of the header.
This commit also removed the rate limit precision header. It also uses a
more accurate calculation algorithm to derive the reset time.
2020-10-28 14:31:15 -07:00