ClientUtil
Useful methods for the client.
Constructor
new ClientUtil(client);
Name | Type | Description | Optional |
---|---|---|---|
client | ShewenyClient | The sheweny client framework | No |
Methods
getButtons()
Get the loaded buttons of the bot.
getCommands()
Get the loaded commands of the bot.
getEvents()
Get the loaded events of the bot.
getInhibitors()
Get the loaded inhibitors of the bot.
getSelectMenu()
Get the loaded select menu of the bot.
Return : Array<SelectMenu>
resolveChannel(guild, arg)
Get a guild channel from a guild.
Parameters :
- guild : The guild where is the channel (Guild)
- arg : Id, mention, name, start of name. (string)
Return : GuildChannel or undefined
resolveCommand(arg)
Get a command from the client.
Parameters :
- arg : Name or aliases. (string)
Return : Command or undefined
resolveGuild(arg)
Get a guild in common with the bot.
Parameters :
- arg : Name or id of guild. (string)
Return : Guild or undefined
resolveGuildEmoji(guild, arg)
Get a emoji from a guild.
Parameters :
- guild : The guild where is the emoji (Guild)
- arg : Id, name, emoji (mention). (string)
Return : GuildEmoji or undefined
[async] resolveMember(guild, arg)
Get a guild member and fetch discord if it is not in the cache.
Parameters :
- guild : The guild where is the member (Guild)
- arg : Id, mention, username, start of username. (string)
Return : GuildMember or undefined
resolveRole(guild, arg)
Get a guild role.
Parameters :
- guild : The guild (Guild)
- arg : Id, mention, name, start of name. (string)
Return : Role or undefined
[async] resolveUser(arg)
Get a user and fetch discord if it is not in the cache.
Parameters :
- arg : Id, mention, name, start of name, name + discriminator. (string)
Return : User or undefined