SettingResolver()

new SettingResolver()

SettingResolver class for SettingGateway argument parsing.

Extends

Methods

async, static maxOrMin(value, minnullable, maxnullable)nullable {boolean}

Check if the input is valid with min and/or max values.
Parameters:
Name Type Attributes Description
value any The value to check.
min number <nullable>
Min value.
max number <nullable>
Max value.
Returns:
boolean

async boolean(bool) → {Promise.<?boolean>}

Resolve a Boolean instance.
Parameters:
Name Type Description
bool boolean | string The boolean to validate.
Returns:
Promise.<?boolean>
Overrides:

async channel(channel) → {Promise.<?Channel>}

Resolve a Channel object by its instance of Channel, or by its Snowflake.
Parameters:
Name Type Description
channel Channel The channel to validate.
Returns:
Promise.<?Channel>
Overrides:

async float(number) → {Promise.<?number>}

Resolve a Float.
Parameters:
Name Type Description
number string | number The float to validate.
Returns:
Promise.<?number>
Overrides:

async guild(guild) → {Promise.<?Guild>}

Resolve a Guild object by its instance of Guild, or by its Snowflake.
Parameters:
Name Type Description
guild Guild The guild to validate/find.
Returns:
Promise.<?Guild>
Overrides:

async integer(integer) → {Promise.<?number>}

Resolve an Integer.
Parameters:
Name Type Description
integer string | number The integer to validate.
Returns:
Promise.<?number>
Overrides:

async member(member, guild) → {Promise.<?GuildMember>}

Resolve a GuildMember object by its instance of GuildMember, User, or by its Snowflake.
Parameters:
Name Type Description
member GuildMember | User | Snowflake The number to validate.
guild Guild The Guild object in which the member can be found.
Returns:
Promise.<?GuildMember>
Inherited From:

async msg(message, channel) → {Promise.<?Message>}

Fetch a Message object by its Snowflake or instanceof Message.
Parameters:
Name Type Description
message Snowflake The message snowflake to validate.
channel Channel The Channel object in which the message can be found.
Returns:
Promise.<?Message>
Inherited From:

async msgs(message, channel, limitopt) → {Promise.<?Collection.<Message>>}

Fetch messages by a snowflake or instanceof Message
Parameters:
Name Type Attributes Default Description
message Snowflake The message snowflake to validate.
channel Channel The Channel object in which the message can be found.
limit number <optional>
100 The number of messages to fetch and send back.
Returns:
Promise.<?Collection.<Message>>
Inherited From:

async role(role, guild) → {Promise.<?Role>}

Resolve a Role object by its instance of Role, or by its Snowflake.
Parameters:
Name Type Description
role Role The role to validate/find.
guild Guild The Guild object in which the role can be found.
Returns:
Promise.<?Role>
Overrides:

async string(string) → {Promise.<?string>}

Resolve a String instance.
Parameters:
Name Type Description
string string The string to validate.
Returns:
Promise.<?string>
Overrides:

async url(hyperlink) → {Promise.<?string>}

Resolve a hyperlink.
Parameters:
Name Type Description
hyperlink string The hyperlink to validate.
Returns:
Promise.<?string>
Overrides:

async user(user) → {Promise.<?User>}

Resolve a User object by its instance of User, GuildMember, or by its Snowflake.
Parameters:
Name Type Description
user User The user to validate.
Returns:
Promise.<?User>
Overrides: