DB-Script
Discord Server
NPM
Search…
DB-Script
Getting Started
NPM Updates
Known Bugs
Functionalities
Bot Functions
Events
Functions
Action
Compacts
Conditions
Data
Embeds
Limiters
Music
Variables
$allVars
$getChannelVar
$getMessageVar
$getServerVar
$getUserVar
$getVar
$resetChannelVar
$resetMessageVar
$resetServerVar
$resetUserVar
$resetVar
$setChannelVar
$setMessageVar
$setServerVar
$setUserVar
$setVar
Guides
Other
Contributors
Discord Server
FAQs
Staff
Powered By
GitBook
$getServerVar
Get the value of the provided server variable.
FUNCTION USAGE
$getServerVar[varName]
$getServerVar[varName;guildID]
Properties:
varName
- The variable being called in the command
guildID
- The guild ID of the variable being called. Defaults to current guild if none is defined.
​
Example 1: Getting the server variable value
1
bot.Command({
2
name: "check",
3
code:`
4
__Total messages sent in the server__
5
$numberSeparator[$getServerVar[serverMsgs];,]
6
`})
Copied!
Only 1 value can be stored in the same variable in each server. This variable accounts for the entire server
Previous
$getMessageVar
Next
$getUserVar
Last modified
1yr ago
Copy link
Contents
Properties: