allow resolve result to be nullable
This commit is contained in:
parent
d58578c5ae
commit
33ccdd0f0f
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "commandparser",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"description": "Parser meant to parse commands and their options for discord bots",
|
||||
"main": "index.ts",
|
||||
"author": "Navy.gif",
|
||||
|
@ -8,7 +8,7 @@ interface IResolver <User, Member, Channel, Role, Guild> {
|
||||
* @return {User} {User}
|
||||
* @memberof IResolver
|
||||
*/
|
||||
resolveUser(resolveable: string, strict?: boolean): User
|
||||
resolveUser(resolveable: string, strict?: boolean): User | null
|
||||
|
||||
/**
|
||||
* Should resolve to a member abstraction
|
||||
@ -19,7 +19,7 @@ interface IResolver <User, Member, Channel, Role, Guild> {
|
||||
* @return {Member} {Member}
|
||||
* @memberof IResolver
|
||||
*/
|
||||
resolveMember(resolveable: string, strict?: boolean, guild?: Guild): Member
|
||||
resolveMember(resolveable: string, strict?: boolean, guild?: Guild): Member | null
|
||||
|
||||
/**
|
||||
* Should resolve to a role abstraction
|
||||
@ -30,7 +30,7 @@ interface IResolver <User, Member, Channel, Role, Guild> {
|
||||
* @return {Channel} {Channel}
|
||||
* @memberof IResolver
|
||||
*/
|
||||
resolveChannel(resolveable: string, strict?: boolean, guild?: Guild): Channel
|
||||
resolveChannel(resolveable: string, strict?: boolean, guild?: Guild): Channel | null
|
||||
|
||||
/**
|
||||
* Should resolve to a role abstraction
|
||||
@ -41,7 +41,7 @@ interface IResolver <User, Member, Channel, Role, Guild> {
|
||||
* @return {Role} {Role}
|
||||
* @memberof IResolver
|
||||
*/
|
||||
resolveRole(resolveable: string, strict?: boolean, guild?: Guild): Role
|
||||
resolveRole(resolveable: string, strict?: boolean, guild?: Guild): Role | null
|
||||
|
||||
/**
|
||||
* Should resolve to true when a truthy resolveable is passed, i.e. yes, true, on etc
|
||||
@ -62,7 +62,7 @@ interface IResolver <User, Member, Channel, Role, Guild> {
|
||||
* @return {number} {number}
|
||||
* @memberof IResolver
|
||||
*/
|
||||
resolveTime(resolveable: string): number
|
||||
resolveTime(resolveable: string): number | null
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user