Maximilian von Lindern
0a8b24339b
API: Added timeout if deadline is after rate limit ( #173 )
...
* Rate: don't sleep if sleep exceeds context deadline
* Httputil: add Client.Timeout
* Bot: set default API timeout to 5 minutes
* Rate: reduce calls to time.Now in Acquire
* API: Optimize to use deadline instead of recalculating
Co-authored-by: diamondburned <datutbrus@gmail.com>
2020-11-25 12:08:42 -08:00
diamondburned
6cbe95d2b3
State: Fixed erroneous context setting and races in Ready
2020-11-14 15:30:18 -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
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
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
56b1a7cce8
Bot: Help generators now allow generating hidden commands
2020-07-14 16:33:21 -07:00
diamondburned
edb8a46ef2
Gateway: Added intent helpers and more context API support
2020-07-11 12:50:32 -07:00
mavolin
41ce1f389e
make all error messages lowercase
2020-05-16 23:14:49 +02:00
diamondburned
795a69ca7d
Bot: Added EditableCommands
2020-05-14 18:52:15 -07:00
diamondburned
729979088c
Bot: Added more tests and the Help API
2020-05-14 14:04:18 -07:00
diamondburned (Forefront)
e556d2afad
Bot: Partially implemented middlewares
2020-05-14 13:59:17 -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)
2548b92f1e
Bot: Errors can no longer mention others.
2020-05-12 01:02:08 -07:00
diamondburned (Forefront)
85c1326526
Bot: Added ArgsParser for each Context instead of global
2020-05-05 23:23:52 -07:00
diamondburned (Forefront)
9411dcc74f
Bot: Removed deprecated Wait() API
2020-04-12 11:08:19 -07:00
diamondburned (Forefront)
4e4ebde93a
Gateway: Deprecated Wait(), fixed ReconnectOP bug
2020-04-12 11:06:43 -07:00
diamondburned (Forefront)
70ace8e5e4
Bot: Added AllowBot
2020-04-09 21:46:21 -07:00
diamondburned (Forefront)
cc530ce7a2
Bot: Allow func(T), added more documentation, minor fixes
2020-04-09 13:49:12 -07:00
diamondburned (Forefront)
3ee307b788
Bot: Added Usager, improved help
2020-04-08 21:25:50 -07:00
diamondburned (Forefront)
09ae9fbb07
Bot: Added a Prefixer API which breaks the old Prefix string API
2020-04-06 13:27:33 -07:00
diamondburned (Forefront)
8c833814ba
Examples: Fixed advanced_bot bug where it immediately removes its own handlers
2020-03-30 18:02:51 -07:00
diamondburned (Forefront)
f0102d765f
Gateway: Added a retry limit
...
State: Event handlers now handle all of Ready's Guilds field
Session: Added Wait, which blocks until SIGINT or Gateway error
2020-02-29 18:13:58 -08:00
diamondburned (Forefront)
79c4c1caca
Gateway/State: Added message acking and more user update events for State
2020-02-24 21:50:13 -08:00
diamondburned
00c1e5c43c
Bot: Fixed compile error
2020-02-21 07:57:35 -08:00
diamondburned (Forefront)
1e95e108c8
Bot: added more tests
2020-02-04 21:19:45 -08:00
diamondburned (Forefront)
3770927a48
Bot: trivial fixes
2020-01-28 16:01:39 -08:00
diamondburned (Forefront)
1c25ccbf8e
Bot: added data return types
2020-01-26 01:06:54 -08:00
diamondburned (Forefront)
0c57c6d127
Bot: errors are now mention-escaped
2020-01-26 00:00:52 -08:00
diamondburned (Forefront)
a5d817b28d
Help subcommand method
2020-01-23 22:46:17 -08:00
diamondburned (Forefront)
95f06cca45
Added HelpAdmin
2020-01-23 22:20:02 -08:00
diamondburned
aadcbd0767
Added middleware features into package bot. ( #3 )
...
* Middleware nameflag
* Completed M-Middleware feature
* Changed Namer/Descriptor API to CanSetup API
2020-01-23 19:17:03 -08:00
diamondburned (Forefront)
6d4b23ff05
Bot API improvements
2020-01-21 23:24:15 -08:00
diamondburned (Forefront)
7e73f00eb9
Fixed bug where ParseContent interface methods won't return a proper error
2020-01-20 20:25:47 -08:00
diamondburned (Forefront)
1c9b45e051
Tweaked bot router docs
2020-01-19 19:46:48 -08:00
diamondburned (Forefront)
a6bf7c340b
Added example into bot/Context's doc
2020-01-19 17:58:24 -08:00
diamondburned (Forefront)
28228a60f5
Ported rfrouter over
2020-01-18 22:06:00 -08:00