1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-01 12:34:28 +00:00
Commit graph

14 commits

Author SHA1 Message Date
diamondburned 9df396bb7f Bot: Fixed unable to call Plumbed method by command 2020-12-18 15:00:21 -08:00
diamondburned 29582d6131 Bot: Allow both plumbed and normal commands
This commit changes the existing Plumb behavior to allow normal commands
to coexist along a plumbed command. This change allows certain behaviors
that would otherwise require manually switching on arguments.

An example use case of this change would be having a default behavior
when a subcommand call doesn't have a command name. For example, given
this code:

    func (b *Banana) Setup(sub *bot.Subcommand) { sub.SetPlumb(b.Help) }

    func (b *Banana) Green(*gateway.MessageCreateEvent) {}
    func (b *Banana) Help(*gateway.MessageCreateEvent)  {}

The subcommand "banana" could have its own help when it's called as
"!banana", while "!banana green" would trigger another handler.
2020-11-30 14:26:53 -08:00
diamondburned afc87adbae Bot: Refactored accordingly to State's new Store API 2020-11-29 17:19:59 -08:00
diamondburned 75df94d9f4 *: Migrated Go Modules to v2 2020-10-28 15:39:59 -07: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 (Forefront) 67430c6d7a Bot: Added Plumb support, fixed tests
Merged

Merged
2020-05-14 13:59:17 -07:00
diamondburned (Forefront) 964e8cdf13 Bot: Partially implemented middlewares 2020-05-14 13:59:17 -07:00
diamondburned (Forefront) 90bf9d74e3 Bot: Fixed bug where RawArguments still have the command 2020-05-03 22:57:44 -07:00
diamondburned (Forefront) 4a14c4d059 Bot: Allow variadic functions to have empty trailing arguments 2020-05-03 21:22:19 -07:00
diamondburned (Forefront) b122aa6561 Bot: Added trailing manual parser support 2020-05-03 18:33:24 -07:00
diamondburned (Forefront) 748ad5641c API: Added AllowedMentions and more tests 2020-04-19 16:35:37 -07:00
diamondburned (Forefront) 7905e2138b Fixed tests that broke because of previous breaking change 2020-04-12 16:24:28 -07:00
diamondburned (Forefront) 9fefba18f7 Bot: Fixed tests to pass with the new Prefixer API 2020-04-06 13:31:27 -07:00
diamondburned (Forefront) 9d3528190f Bot: added Plumb flag, methods no longer need arguments be pointers 2020-01-25 21:43:42 -08:00