Discord Bot Studio
  • Discord Bot Studio Documentation v2.0
  • Setting Up DBS
    • Create and Setup Bot With DBS [video]
    • Getting Started with DBS [text]
    • Inviting a Discord Bot to Your Server
    • Enabling Intents
    • Finding Your Bot Token
    • Using the Bot Editor
  • Response Nodes (by type)
    • Message Category
      • Send Message
      • Send Image
      • Send Embed
      • Delete Message
      • Check if Message is in Channel
    • Reaction Category
      • Add Reaction Listener
    • Variable Category
      • Store Value in Variable
      • Edit Variable
      • Check Variable Value
      • Check if Variable Exists
      • Generate Random Number
      • Get Mentioned User
    • User Data Category
      • Set User Data
      • Get User Data
      • Edit User Data
      • Check User Data
    • User Action Category
      • Add Role to User
      • Remove Role from User
    • Control Category
      • Wait
      • Switch Case
      • Multiple Input
    • Interaction Category
      • Reply To Interaction With Message
      • Get Interaction Option
      • Delete Interaction Reply
    • External Category
      • Call API
  • Running/Hosting Your Bot
    • Hosting your bot 24/7
    • Running Bot Locally
    • Multiple Bots
  • Commands
    • Message Commands
    • Kick / Ban Command
    • Purge Command
    • Role reaction menu
    • XP System
    • Ticket System
    • Command Aliases
  • Events
    • Overview
    • Event Types
      • User Joins Server
      • Any Message
      • Bot Initialization
      • Channel Create
      • Channel Delete
      • Channel Update
  • Misc
    • How to use custom emojis
    • Buttons and Selects
      • Determining which button was clicked
    • Slash Commands
    • Tagging a role
    • Tagging a channel
  • Mods
    • Creating Mods
    • Installing Mods
  • Spreadsheets
    • Using Spreadsheet Data
Powered by GitBook
On this page

Was this helpful?

  1. Response Nodes (by type)

Variable Category

Nodes in the Variable response category.

PreviousAdd Reaction ListenerNextStore Value in Variable

Last updated 3 years ago

Was this helpful?

Variables are important tools in creating a useful Discord bot. Variables in Discord Bot Studio can be leveraged in a similar way to traditional programming. Use the nodes in this category to interact with variables. You can also insert a variable value into most fields using the Insert Variable button next to the field.

There are three types of variables: temporary, server, and global.

Temporary variables are stored for the duration that the bot is running. They are not saved to file and will be deleted when the bot goes offline. They are per-server.

Server variables operate exactly like temporary variables, but they are saved to file and thus persist even if the bot is restarted.

Global variables are also saved to file and are persistent. They differ from server variables because they are not specific to a certain server; i.e. they can be used by the bot across all servers that it's in.

Store Value in Variable
Edit Variable
Check Variable Value
Check if Variable Exists
Generate Random Number
Get Mentioned User