コンテンツにスキップ
Version: v1.3
目次

roleSetup

このコンテンツはまだ日本語訳がありません。

This class provides methods to interact with the database. Used for performing operations like creating, updating, deleting, and querying documents.

Adds a role to the role setup.

Parameter Type Required Description
client Client ✅ The Discord client.
guildId string ✅ The guild ID of the role setup.
options LevelAddOptions ✅ The options for the role setup.
  • Promise<boolean> - If the role was added successfully.
  • new Error() - If an invalid type or value is provided.

Finds a role in the role setup.

Parameter Type Required Description
guildId string ✅ The guild ID of the role setup.
level number ✅ The level number of the role setup.
  • Promise<{ lvl: number, role: string || string[] }> - The role setup object.
  • new Error() - If an invalid type or value is provided.

Lists all level roles in a guild.

Parameter Type Required Description
client Client ✅ The Discord client.
guildId string ✅ The guild ID of the role setup.
  • Promise<Array<{ lvl: number, role: string || string[] }>> - The role setup object.
  • XpFatal - If there are no level roles in the guild.

Removes a role from the role setup.

Parameter Type Required Description
client Client ✅ The Discord client.
guildId string ✅ The guild ID of the role setup.
options LevelRemoveOptions ✅ The options for the role setup.
  • Promise<boolean> - If the role was removed successfully.
  • new Error() - If an invalid type or value is provided.

Options Type Required Description
level number ✅ Level to add the role to.
role Role ID ✅ ID of the role to add.
Options Type Required Description
level number ✅ Level to remove the roles from.