1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-05 06:26:08 +00:00
Commit graph

611 commits

Author SHA1 Message Date
Tyler 59539403b3 Voice: Implement Voice Gateway events
Speaking event patches and support Client Connect/Disconnect events.
2020-11-17 12:15:05 -08:00
diamondburned d1242fc39a Voice: Remove Session from repository before disconnecting
This commit introduces this change so that Voice can be called from
other threads without waiting for one Session to disconnect itself.
2020-11-17 11:01:34 -08:00
diamondburned 364f8388ed State: Fixed a mutex copy 2020-11-17 11:01:34 -08:00
Tyler Stuyfzand de7d7f62a4
Voice: Add UserID to SpeakingData (#161) 2020-11-15 01:37:56 -08:00
diamondburned 42724e0b91 Bot: Fixed CustomParser trim not using aliases and plumbs 2020-11-14 22:27:55 -08:00
diamondburned af63bb2e66 Bot: Proper unknown command error punctuations 2020-11-14 22:12:02 -08:00
diamondburned ee9d6b0d4d Bot: clearer subcommand not found error 2020-11-14 22:11:10 -08:00
diamondburned 0932e2903b Bot: Fixed CustomParser arguments still having subcommand 2020-11-14 21:05:31 -08:00
diamondburned 4992f4ab20 API: Fixed incorrect DeleteAllReactions endpoint 2020-11-14 16:32:16 -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 f6e270ae9c json: Fixed a race condition with erroneous JSON streams 2020-11-14 14:18:50 -08:00
diamondburned 273fcf1418 Bot: Added subcommand aliases and better setup API
This commit adds subcommand aliases as well as additional code in
HelpGenerate to cover for both subcommand and command aliases.

A breaking change is that {,Must}RegisterSubcommandCustom methods are
now replaced with normal {,Must}RegisterSubcommand methods. This is
because they now use variadic strings, which could take 0, 1 or more
arguments.

This commit also allows AddMiddleware and similar methods to be given a
method directly:

    sub.Plumb(cmds.PlumbedHandler)
    sub.AddMiddleware(cmds.PlumbedHandler, cmds.plumbMiddleware)

This change closes issue #146.
2020-11-12 19:02:52 -08:00
diamondburned f85aac09be Voice: Added intent adders into constructor 2020-11-12 18:55:05 -08:00
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