Commit Graph

90 Commits

Author SHA1 Message Date
FiniteReality
70d30efb94 Implement configurable command node separators
This fixes #304 over foxbot's PR for the same issue.
2016-12-09 10:31:57 +00:00
RogueException
803b65212e Merge pull request #364 from FiniteReality/feature/parameter-tweaks
Parameter preconditions and typereader overriding
2016-12-07 21:39:55 -04:00
Aux
d4d8e721db Resolves #390
Fix case insensitive commands forcing parameters to return lowercase
2016-12-04 17:29:39 -04:00
FiniteReality
704b2b75f4 Fix changes after review 2016-12-03 23:51:20 +00:00
FiniteReality
254e874c99 Fix OverrideTypeReader
This commit also adds a TypeReaders property to CommandService, so
it is possible to see all of the registered TypeReaders. This makes
it possible for users to implement their own parsing instead of
using the built-in parsing.
2016-12-03 23:51:20 +00:00
james7132
3e35666186 Add TimeSpan TypeReader 2016-11-27 01:57:12 -08:00
Christopher F
ecc3d9c729 Add configuration option for case insensitive commands
Currently, commands are case-sensitive. This PR allows for commands to be case insensitive (which is now the default option).
2016-11-26 23:12:23 -05:00
Christopher F
55f6efd080 Merge branch 'issue/365'
Conflicts:
	src/Discord.Net.Commands/CommandService.cs
2016-11-26 22:26:47 -05:00
Christopher F
f9c5e229d0 Add CommandServiceConfig, DefaultRunMode
This adds an (optional) CommandServiceConfig, as well as a DefaultRunMode for commands.

This resolves #368 (for commands where a RunMode is not explicitly specified, a custom default value should be used)
2016-11-25 18:49:35 -05:00
FiniteReality
05fb81c617 Fix a bunch of issues with aliases 2016-11-20 20:20:23 +00:00
RogueException
593ba46f1c Cleaned up command builders and async func names 2016-11-18 08:18:00 -04:00
FiniteReality
de645548a9 Complete command builders implementation
In theory this should just work, more testing is needed though
2016-11-18 09:14:19 +00:00
FiniteReality
6d46347ebc Finish implementation of command builders 2016-11-16 21:01:11 +00:00
RogueException
b8102a6767 Default DependencyMap to an empty map when not supplied 2016-10-20 03:55:14 -03:00
FiniteReality
a7cefbcf9f Move DI stuff around to support scoped DI 2016-10-16 17:33:00 +01:00
james7132
3841eb616c Fix #311
TypeInfo.BaseType will likely return the same Type if all modules derive from
ModuleBase or some common subclass of it. Making it appear as if only one module
is registered.

Changed to TypeInfo.AsType for expected behavior.
2016-10-16 08:39:26 +00:00
RogueException
8c8ac47887 Merge pull request #308 from Joe4evr/AutoLoadFix
Exclude abstract types from being loaded as modules.
2016-10-15 14:29:24 -03:00
RogueException
8ebc437674 Exposed IDependencyMap in CommandService.Execute 2016-10-15 12:27:51 -03:00
Joe4evr
bc45c0b6a4 Exclude abstract types from being loaded as modules. 2016-10-14 18:41:13 +02:00
RogueException
635819b89f Reduced command module lifetime to a single command execution. Removed ModuleAttribute. 2016-10-10 20:27:16 -03:00
RogueException
5c33e28757 Added missing ConfigureAwaits 2016-10-08 16:59:17 -03:00
RogueException
98475302af Added bool/char typereaders 2016-10-06 04:05:32 -03:00
RogueException
3c3e790edd Replaced several arrays with immutables 2016-10-05 23:59:55 -03:00
RogueException
708f9fe514 Added CommandContext, fixed commands compile errors 2016-10-04 09:54:44 -03:00
FiniteReality
accb3e27b8 Add PriorityAttribute and sortby priority in Search 2016-09-15 18:43:06 +01:00
RogueException
23a0316252 Split IMessage into IUserMessage and ISystemMessage 2016-08-27 19:07:22 -03:00
RogueException
f6d8659a2e Removed ParamList null checks 2016-08-21 21:47:32 -03:00
RogueException
324664917d Added new parameter scoring, support multiple matches 2016-08-21 11:03:50 -03:00
FiniteReality
610a3a26ab Add DI support to command Groups 2016-08-20 21:06:13 +01:00
RogueException
0b25554c31 Unknown overload should return UnknownCommand instead of ParseFailed 2016-08-17 10:07:26 -03:00
RogueException
94d6acc00e Exposed reflection classes on commands, modules and parameters 2016-08-12 06:36:06 -03:00
RogueException
e452aa9662 Cleaned up Command Result structs 2016-08-09 17:53:08 -03:00
Finite Reality
0e920da21f Complete Preconditions implementation 2016-08-03 17:21:38 +01:00
Finite Reality
a5393dc937 Rename Permission to Precondition 2016-08-03 16:50:51 +01:00
Finite Reality
023703c996 Add logic to CommandService.Execute to handle basic permissions checks 2016-08-03 16:43:25 +01:00
Christopher F
4c200c94ec Key the ModuleMap based on Type rather than instance 2016-07-30 21:44:14 -04:00
Christopher F
9348e087b0 Don't load modules that are already loaded
Previously, if a user autoloaded commands more than once, commands that were already in the command map would be readded. 

If the module list already contains a module with the same type as the module being loaded, it will not load the new instance of this module.
2016-07-30 18:23:12 -04:00
RogueException
4a06753990 Cleaned up TypeReaders 2016-07-26 19:01:51 -03:00
Finite Reality
f7455c389b Improve DI system 2016-07-21 00:23:49 +01:00
Christopher F
bbe51012cf Add Dependency Map, Update Assembly Crawler
[Untested] Assembly Crawler will now accept constructors matching: new(), new(CommandService), new(IDependencyMap).

Add IDependencyMap

Add DependencyMap
2016-07-20 17:50:52 -04:00
Christopher F
6e42acba68 Add Autoload to Module Attribute
[UNTESTED] Adds an optional parameter to the Module attribute, "autoload", which defaults to true.

Specifies whether or not the assembly crawler should load this module.
2016-07-20 17:20:37 -04:00
RogueException
da2002b520 Renamed Message.Text -> Message.Content 2016-07-15 22:34:27 -03:00
RogueException
efc87ef06d Removed IMessage.Text, renamed RawText -> Text, added Resolve 2016-07-13 13:07:24 -03:00
RogueException
079d9d487d Forwarded the parse error if a command search has only one match 2016-07-12 07:39:27 -03:00
Khionu Terabite
3ad3912606 We all do it now and then <3 2016-07-07 20:35:46 -04:00
RogueException
7723130713 Implemented new CommandMap 2016-06-29 07:03:44 -03:00
RogueException
37ab13160b Fixed CommandService.Execute crash bug 2016-06-29 05:27:29 -03:00
RogueException
7bb890cbfe Added command groups, fixed several bugs 2016-06-27 06:56:24 -03:00
RogueException
f6c31a0b19 Added argPos overloadeds to CommandService's Search and Execute 2016-06-26 22:53:46 -03:00
RogueException
0e710cc76a Added a shorthand CommandService.Execute method 2016-06-26 21:40:05 -03:00