1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-19 05:12:48 +00:00
Commit graph

12 commits

Author SHA1 Message Date
dependabot[bot] 2310bedc5e
examples/voice: Bump golang.org/x/crypto (#381)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20210921155107-089bfa567519 to 0.1.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-25 07:23:19 -08:00
dependabot[bot] 99156b7e9d
examples/voice: Bump golang.org/x/sys (#379)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20211001092434-39dca1131b70 to 0.1.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-25 02:18:36 -08:00
diamondburned ced922d377
examples: Update commands to use cmdroute 2022-12-10 06:03:04 -08:00
diamondburned dc5454895e
examples: Update commands/ from commands-hybrid/ 2022-10-01 19:40:19 -07:00
diamondburned 9de994c73c
examples: Add commands-hybrid 2022-08-22 23:45:07 -07:00
twoscott ea5251df0f examples: Update Autocomplete example 2022-06-05 17:56:52 -07:00
diamondburned ec4cd6d661
examples: Add voice example 2022-04-03 17:49:21 -07:00
PL Pery 11432e426c
discord: Correct BulkOverwriteGuildCommands parameters (#301) 2022-01-03 13:38:38 -08:00
diamondburned 54cadd2f45 gateway: Refactor for a better concurrent API
This commit refactors the whole package gateway as well as utils/ws
(formerly utils/wsutil) and voice/voicegateway. The new refactor
utilizes a design pattern involving a concurrent loop and an arriving
event channel.

An additional change was made to the way gateway events are typed.
Before, pretty much any type will satisfy a gateway event type, since
the actual type was just interface{}. The new refactor defines a
concrete interface that events can implement:

    type Event interface {
        Op() OpCode
        EventType() EventType
    }

Using this interface, the user can easily add custom gateway events
independently of the library without relying on string maps. This adds a
lot of type safety into the library and makes type-switching on Event
types much more reasonable.

Gateway error callbacks are also almost entirely removed in favor of
custom gateway events. A catch-all can easily be added like this:

    s.AddHandler(func(err error) {
        log.Println("gateway error:, err")
    })
2021-12-14 13:49:34 -08:00
Tadeo Kondrak 9289303255 examples: Add autocomplete example 2021-11-15 14:30:48 -08: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
diamondburned 1b154cb65f
example: Rename _example to 0-examples
This commit renames the examples folder so gopls can pick it up.
2021-11-09 15:56:51 -08:00