Commit Graph

35 Commits

Author SHA1 Message Date
diamondburned 3b98cde06f
README: Fix bare minimum example 2022-12-10 06:03:57 -08:00
diamondburned ced922d377
examples: Update commands to use cmdroute 2022-12-10 06:03:04 -08:00
diamondburned feb624758b
README: Slight restructure
This commit rewrites some parts of the README.

It removes the section about package bot, because we all should just
forget that it ever existed. Thanks, Discord.

It also removes a section that compared the library against Discordgo.
The section was written 3 years ago so it was very outdated. Instead, it
is replaced with a "Library Highlights" section, which provides much
more insights on the library itself.
2022-12-10 05:21:56 -08:00
diamondburned e3e35a9628
README: Warn against use of messages for bots 2022-10-01 19:37:15 -07:00
diamondburned 0f0c968634
README: Add commands-hybrid, minor tweaks 2022-08-23 13:37:10 -07:00
avdb c2382028df
README: Fix broken links (#298) 2021-12-20 13:57:04 -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
diamondburned 8abd5bc86e
readme: Fix bot import path 2021-11-09 18:30:58 -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
diamondburned 477695f2e6
readme: Fix build badge 2021-11-03 15:42:37 -07:00
diamondburned 76c25835b7
bot: Move bot to utils 2021-09-18 00:39:34 -07:00
bumbread 3753794fad readme: Fix non-compiling example (#258) 2021-08-08 15:02:35 -07:00
Samuel Hernandez 40e1a3757d *: Migrated Go Modules to v3 2021-06-01 19:59:01 -07:00
diamondburned 3713c9d404 Bot: Added Run(); updated examples 2021-02-23 21:40:44 -08:00
Prophet 878b36fa2f
Example links in readme direct to v2 examples (#184) 2021-01-28 13:45:57 -08:00
diamondburned 1dc11549bc Updated README 2020-11-19 12:00:14 -08:00
diamondburned 0d219428a0 README: Updated badges 2020-11-02 17:32:00 -08: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
diamondburned 795a69ca7d Bot: Added EditableCommands 2020-05-14 18:52:15 -07:00
diamondburned (Forefront) 5a07d097da CI: Added coverage for integration tests 2020-04-26 18:21:52 -07:00
diamondburned (Forefront) 126ab255cd Updated README to document WSRetries 2020-03-18 22:00:05 -07:00
diamondburned (Forefront) 02987206ab README: Updated reconnect behavior 2020-02-21 23:58:01 -08:00
diamondburned (Forefront) 16cbbb4f25 README: Added Go Report Card 2020-01-31 10:14:18 -08:00
diamondburned (Forefront) 1e36edc842 README: Added test coverage 2020-01-31 10:10:59 -08:00
diamondburned (Forefront) de37b58dd3 Added Advanced Bot into README 2020-01-19 19:45:11 -08:00
diamondburned (Forefront) ac685b0df4 Minor fixes, undocumented things, and editorconfig 2020-01-19 13:54:16 -08:00
diamondburned (Forefront) e78cf501a5 Updated README 2020-01-19 08:35:32 -08:00
diamondburned (Forefront) 8ce6e94990 Added tidbits into README 2020-01-18 22:17:29 -08:00
diamondburned (Forefront) a82d71ad3c Added more Gateway commands 2020-01-18 14:35:07 -08:00
diamondburned (Forefront) 5babb4d699 Updated README 2020-01-18 13:51:57 -08:00
diamondburned 2dc983d243 Added simple example 2020-01-17 14:29:13 -08:00
diamondburned (Forefront) 9df384bf32 Hyperlinks for shields 2020-01-15 21:10:20 -08:00
diamondburned (Forefront) 76e81c5e3f Added shields into README 2020-01-15 21:04:08 -08:00
diamondburned d1341b61b3
Gateway integration test + Bug fixes 2020-01-15 19:28:21 -08:00
diamondburned 09d9651507 Initial commit 2020-01-01 21:39:52 -08:00