Discord
QuackJSUtils.Discord
Functions
CreateCategory
â–¸ Const
CreateCategory(guild
, name
, options
): Promise
<CategoryChannel
>
A function for creating category channels.
Parameters
guild
Guild
The guild which will be modified.
name
string
The name of the category.
options
GuildChannelCreateOptions
The options for the category.
Returns
Promise
<CategoryChannel
>
The category channel.
Defined in
CreateChannel
â–¸ Const
CreateChannel(guild
, name
, options
): Promise
<TextChannel
>
A function for creating a channel.
Parameters
guild
Guild
The guild which will be modified.
name
string
The name of the text channel.
options
GuildChannelCreateOptions
The options for the text channel.
Returns
Promise
<TextChannel
>
The text channel.
Defined in
CreateRole
â–¸ Const
CreateRole(guild
, options
): void
A function for creating roles.
Parameters
guild
Guild
The guild which will be modified.
options
CreateRoleOptions
The option for the new role.
Returns
void
Defined in
DeleteCategory
â–¸ Const
DeleteCategory(guild
, finder
): void
A function for deleting a category channel.
Parameters
guild
Guild
The guild which will be modified.
finder
string
The parameter which the function will search for.
Returns
void
Defined in
DeleteChannel
â–¸ Const
DeleteChannel(guild
, finder
): void
A function for deleting a channel.
Parameters
guild
Guild
The guild which will be modified.
finder
string
The parameter which the function will search for.
Returns
void
Defined in
DeleteRole
â–¸ Const
DeleteRole(guild
, finder
): void
A function for deleting roles.
Parameters
guild
Guild
The guild which will be modified.
finder
string
The parameter which the function will search for.
Returns
void
Defined in
Embed
â–¸ Const
Embed(message
, placeholders?
): MessageOptions
A function for generating an embed with ease.
Parameters
message
QuackJSMessage
The message object to be generated from.
placeholders?
Record
<string
, any
>
The placerholders to be replaced within the message
.
Returns
MessageOptions
The formatted Discord Message Options.
Defined in
GetChannel
â–¸ Const
GetChannel(guild
, finder
): undefined
| ThreadChannel
| GuildChannel
A function for getting a channel.
Parameters
guild
Guild
The guild which will be modified.
finder
string
| Channel
The parameter which the function will search for.
Returns
undefined
| ThreadChannel
| GuildChannel
The channel.
Defined in
GiveRole
â–¸ Const
GiveRole(guild
, member
, finder
): Promise
<GuildMember
>
A function for giving a user a role.
Parameters
guild
Guild
The guild which will be modified.
member
GuildMember
The member which will be given the role.
finder
string
The parameter for finding roles.
Returns
Promise
<GuildMember
>
A boolean whether or not the user was given the role.
Defined in
HasRole
â–¸ Const
HasRole(member
, finder
): boolean
A function for checking if a user has a role.
Parameters
member
GuildMember
The memeber which will be check.
finder
string
The parameter which the function will search for.
Returns
boolean
true
if the user has the role and false
if the user doesn't have the role.
Defined in
MoveChannelToCategory
â–¸ Const
MoveChannelToCategory(guild
, channel
, category
): void
A function for moving a channel to a category.
Parameters
guild
Guild
The guild which will be modified.
channel
string
| Channel
The channel to be moved to the category
.
category
string
| CategoryChannel
The category which the channel
will be moved to.
Returns
void
Defined in
Prompt
â–¸ Const
Prompt(message
, member
, options
): Promise
<undefined
| Message
<boolean
> | MessageReaction
>
A function for prompting the user for input; either from a message input or a reaction input.
Parameters
message
Message
<boolean
>
The message object to be used.
member
GuildMember
The member to be prompted.
options
QuackJSPromptOptions
The option of the prompt.
Returns
Promise
<undefined
| Message
<boolean
> | MessageReaction
>
A promise which resolves the input the user gave.
Defined in
RemoveRole
â–¸ Const
RemoveRole(guild
, member
, finder
): Promise
<GuildMember
>
A function for removing a role from a user.
Parameters
guild
Guild
The guild which will be modified.
member
GuildMember
The member which will be removed from the role.
finder
string
The parameter for finding roles.
Returns
Promise
<GuildMember
>
A boolean whether or not the user was given the role.
Defined in
Last updated