BotWiz Documentation
DashboardSupport ServerResources
BotWiz Documentation
BotWiz Documentation
  • Welcome to BotWiz!
  • Support Server
  • Dashboard
    • Get Started
    • Settings
    • BotWiz Guides
  • Creations
    • Commands
      • Builder
    • Events
      • List of Discord Events
    • Variables
      • Interaction & Default Variables
      • Custom Variables
        • Bot Variables
      • Unique Variables
      • Function Variables
      • Advanced Variables
      • Event Variables
  • Misc
    • Debugging
    • Exports
  • Blocks
    • Actions
      • Message Actions
        • Modal / Form
        • Send & Edit a Message
        • Delete & Pin a Message
        • Start & End Poll
      • Role Actions
        • Removing & Adding a Role to Everyone
        • Edit a Role
      • Channel Actions
        • Create Channel
        • Edit Channel
        • Delete Channel
        • Purge Messages
      • Member Actions
        • Ban Member
        • Kick Member
        • Member Nickname
        • Timeout Member
        • Unban Member
      • Variable Actions
        • Calculate Variable
        • Delete Variable
        • Set Variable
      • Action Blocks
        • API
        • Create & Delete an Auto Mod Rule
        • Timed & Custom Event
    • Conditions
    • Options
Powered by GitBook
On this page
  • Usage
  • Array Variable Usage

Was this helpful?

  1. Creations
  2. Variables

Custom Variables

Custom variables allow users to store unique data of any sort

PreviousInteraction & Default VariablesNextBot Variables

Last updated 7 months ago

Was this helpful?

Custom variables can be created via the page. There are multiple different types of custom variables which is covered . There are no set limits on the total character count or positions a variable can hold. Users can create an unlimited amount of custom variables to help create and deploy advanced commands and events.

Unlike Event variables, Custom Variables can be used anywhere, in events, or commands. You can also opt for the values to be guild specific or spread across all the guilds your bot is a member of.

Usage

To use a custom variable you can reference it using {custom_[variableName]}. Ensure you replace [variableName] with the name you chose for the custom variable when creating it on the Bot Variables page.

Arrays always start at 0 and increase with each value. So keep this in mind when trying to provide an index value for your array reference. For example:

If you store "apple" as the first value in the array, you would instinctively use 1 as the index. However, due to arrays starting at 0, the correct index for it would be 0. To simplify this, simply take away - 1 from the number you get when counting how many values are in the array. This is an easy way to find the correct index for the value you wish to retrieve.

Array Variable Usage

Referencing custom arrays is simple. You must use a function to perform the action you wish to perform, a list of functions can be found on this page. Any function that accepts an array can be used with custom array variables.

Bot Variables
here