Joe4evr
36ed2b49f0
PreconditionGroup quick fix
It didn't make much sense
8 years ago
Finite Reality
cce572c600
Include names in command builder exceptions ( #663 )
8 years ago
Joe4evr
4a9c8168a9
Add grouping of preconditions to allow for flexible precondition logic. ( #672 )
* Add grouping of preconditions to allow for flexible precondition logic.
* Fix checking Module Preconditions twice (and none of the command's own)
* Fix command preconditions group 0 looping over every other precondition anyway #whoopsies
* Use custom message when a non-zero Precondition Group fails.
* Fix doc comment rendering.
* Refactor loops into local function
* Considering a new result type
* Switch to IReadOnlyCollection<T> and fix compiler errors
* Revert PreconditionResult -> IResult in return types - Change PreconditionResult to a class that PreconditionGroupResult inherits.
* Feedback on property name.
* Change grouping type int -> string
* Explicitly use an ordinal StringComparer
* Full stops on error messages
* Remove some sillyness.
* Remove unneeded using.
8 years ago
FiniteReality
0550006d56
Change wording of permission preconditions
Also fix an issue where RequireBotPermission may throw if used in a
non-guild channel which required guild permissions.
8 years ago
RogueException
285a0e5817
Updated deps, cleaned csprojs
8 years ago
FiniteReality
1e888cde24
Fix CheckPreconditions giving empty service provider
Parameter preconditions were always getting the empty service provider,
even when a custom one was provided in ExecuteAsync, which means that
preconditions which use services cannot work properly.
8 years ago
FiniteReality
00895b1227
Remove CommandService.BuildServiceCollection
💥
8 years ago
Finite Reality
112a434424
Allow for case-insensitive HasStringPrefix ( #644 )
This was 👍 'd in the dev chat, I forgot to make a PR for it (whoops!)
8 years ago
RogueException
870dc50a68
Fixed RequireNsfwAttribute definition
8 years ago
RogueException
ba1982a3f9
Replaced DependencyMap with ServiceCollection and IServiceProvider ( #625 )
8 years ago
Christopher F
7f1fc286cf
Add IChannel.Nsfw, RequireNsfw precondition ( #633 )
* Add IChannel.Nsfw, RequireNsfw precondition
* Refactored IChannel.Nsfw to IsNsfw, removed NsfwUtils
Per pull-request feedback
* proper nsfw channel check
8 years ago
Bond-009
cb4f6e37f6
Overloaded AddModuleAsync with Type ( #581 )
* Overloaded AddModuleAsync with Type
* Overloaded RemoveModuleAsync with Type
* Use expression-bodied method for consistency
8 years ago
Confruggy
3365bbb043
Fixes ChannelTypeReader ( #630 )
8 years ago
Confruggy
4ca273dd4a
Fixes RoleTypeReader ( #631 )
8 years ago
RogueException
f8b9acc4a1
Use implicit package references ( #626 )
8 years ago
Christopher F
6000b15c4d
C#7 TODOs
8 years ago
RogueException
1c6eebf875
Ensure command completes before cleaning up
8 years ago
RogueException
aca8def0cb
ModuleBase should map to ICommandContext
8 years ago
RogueException
a6469e9021
Add support for void-returning commands
8 years ago
RogueException
bceb72dd92
Typo
8 years ago
RogueException
17ba8fe4d0
Better handle the primary alias.
8 years ago
RogueException
33cd1a6c9f
Scan base types during DI injection
8 years ago
RogueException
14f0535a43
Improved typereader not found message
8 years ago
RogueException
b5d817f171
Cleaned up csprojs, added support for tag builds.
8 years ago
Christopher F
2b4a1249f4
Restrict DependencyMap#Get to reference types
It's impossible to add non-reference types to the map, so why allow pulling them out of it.
8 years ago
RogueException
bbd45a6f4b
Fixed CommandException
8 years ago
Finite Reality
ca18eb0eb4
Replace TryGetValue call with TryRemove call ( #586 )
Resolves #584
8 years ago
RogueException
0c8d643519
Minor doc/exception edits
8 years ago
RogueException
3fb21e06c2
Fixed RunMode.Sync running Async. Added ThrowOnError option.
8 years ago
RogueException
ba07484fe9
Removed Mixed RunMode
8 years ago
RogueException
a2b12520b2
Added CommandService logging
8 years ago
Finite Reality
2160e5dac8
Improve parameter precondition type safety ( #532 )
* Improve parameter precondition type safety
Also removes some terrible code which was left over when I first
implemented parameter preconditions. I don't know why that was there.
With this commit, parameter preconditions should be much safer as they
use generic methods instead of janky casting of objects.
* Remove generic CheckPreconditions method
8 years ago
Finite Reality
3ddb01a5a2
Fix order of iteration in ExecuteAsync ( #534 )
8 years ago
RogueException
11ba30c6fa
Cleaned up DepMap type checks
8 years ago
RogueException
334ceacdbf
Merge pull request #546 from khionu/dev
Fix detection of IDependencyMap impl
8 years ago
RogueException
683541ba24
Added RequireOwner support for User tokens
8 years ago
Flamanis
94ea80b45e
Modified User#Discrim check to properly check guild
8 years ago
Flamanis
dc2230de86
guildUsers instantiated to empty collection, removed added nullchecks
A null conditional operator was required at line 70 to avoid a nullref.
8 years ago
Flamanis
c643ceaa47
Add space after if and before (
8 years ago
Flamanis
b5f80a7a6c
Should fix Linq ArgumentNullException
8 years ago
Khionu Sybiern
ba406bb646
Split typechecks into their own conditions
8 years ago
Khionu Sybiern
4274900d43
Implimented discussed changes
8 years ago
Khionu Sybiern
c350debdba
Better implimentation of detection
8 years ago
Khionu Sybiern
df6579260e
Fix detection of IDependencyMap impl
Not pretty, but it works.
8 years ago
Christopher F
3c9704c822
Merge pull request #520 from james7132/property-injection
Conflicts:
docs/guides/samples/dependency_module.cs
src/Discord.Net.Commands/Utilities/ReflectionUtils.cs
8 years ago
Christopher F
7476c4ca38
Cleanup property injection
8 years ago
Christopher F
6fd834f326
Merge pull request #417 from RogueException/feature/better-di
Enhance Dependency Injection
8 years ago
RogueException
1070feafa8
Merge pull request #509 from aequasi/patch-2
Typo
8 years ago
RogueException
966be796b2
Merge pull request #504 from Joe4evr/TypeReader_NRE_fix
Fix ParameterInfo.Type sometimes being null
8 years ago
Christopher F
f3aa546407
Throw an InvalidOp if a user tries to set the DefaultRunMode to Default
never overestimate the end user
8 years ago