DB-Script
Discord Server
NPM
Search…
DB-Script
Getting Started
NPM Updates
Known Bugs
Functionalities
Bot Functions
Events
Functions
Action
$abbreviate
$addCmdReactions
$addCooldown
$addEmoji
$addMessageReactions
$addReactions
$api
$awaitCmdReactions
$awaitMessages
$awaitReactions
$ban
$blackList
$blackListRoles
$bold
$botLeave
$channelSendMessage
$clear
$cloneChannel
$codeblock
$codeblockMessage
$colorRole
$convertFromBytes
$convertToBytes
$createChannel
$createFile
$createRole
$createWebhook
$customCommand
$deleteChannels
$deletecommand
$deleteEmojis
$deleteIn
$deleteMessage
$deleteRole
$deleteSplitText
$deleteWebhook
$disableMentions
$divide
$djsEval
$dm
$editIn
$editMessage
$editSplitText
$emojiToID
$eval
$exec
$extractAmount
$filter
$giveRole
$globalBan
$haste
$italic
$kick
$let
$massRole
$messagePin
$messageUnpin
$modifyChannel
$modifyChannelPerms
$modifyEmoji
$modifyRole
$modifyRolePerms
$modifyWebhook
$multi
$parseFromMS
$parseToMS
$power
$reboot
$removeAllReactions
$removeReactions
$repeat
$replaceText
$replyIn
$revokeInvite
$round
$roundDown
$roundUp
$sendCrosspost
$sendCrosspostDM
$sendWebhook
$setBotAvatar
$setBotName
$setChannelName
$setChannelPosition
$setChannelTopic
$setEmojiName
$setGuildIcon
$setGuildName
$setNickname
$setRolePosition
$setSlowMode
$setStatus
$shutdown
$splitContent
$spoiler
$squareRoot
$strikethrough
$sub
$sum
$takeRole
$tempActivity
$truncate
$tts
$unban
$useChannel
$vcKick
$vcMove
Compacts
Conditions
Data
Embeds
Limiters
Music
Variables
Guides
Other
Contributors
Discord Server
FAQs
Staff
Powered By
GitBook
$abbreviate
Abbreviates large numbers with an acronym symbol to the 2nd decimal point and rounds the last digit.
FUNCTION USAGE
$abbreviate[number]
Properties:
number
- A number to abbreviate. Larger numbers over 1000 will be abbreviated.
​
The last digit in the response will be rounded up or down.
.x0
-
.x4
will round down
.x5
-
.x9
will round up
​
​
Example 1: Output will be
100K
bot.Command({
name: "test",
code: `
$abbreviate[100000]
`
})
​
Example 2: Output will be
10M
bot.Command({
name: "ban",
code: `
$abbreviate[10000000]
`
})
​
Example 3: Output will be
2.23K
bot.Command({
name: "ban",
code: `
$abbreviate[2225]
`
})
​
Example 4: Output will be
2.22K
bot.Command({
name: "ban",
code: `
$abbreviate[2224]
`
})
Previous
Action
Next
$addCmdReactions
Last modified
11mo ago
Copy link
Outline
Properties: