dbd.ts
  • Welcome
  • Changelog
  • Guides
    • Adding Events
    • Author-Only Interactions
    • Bot Options
    • Command Handler
    • Context Menus
    • Custom Functions
    • Slash Commands
    • Statuses
    • Variables
  • Callbacks
    • onBotJoin
    • onBotLeave
    • onJoin
    • onLeave
    • onReactionAdd
    • onReactionRemove
    • onReady
    • Space Commands
  • Functions
    • $addActionRow
    • $addButton
    • $addCmdReactions
    • $addField
    • $addSelectMenu
    • $addSelectMenuOption
    • $addThreadMember
    • $addTimestamp
    • $akarui
    • $allMembersCount
    • $approximateMemberCount
    • $approximatePrecenseCount
    • $archiveThread
    • $argCount
    • $attachment
    • $author
    • $authorAvatar
    • $authorID
    • $awaitMessage
    • $ban
    • $banCount
    • $botCount
    • $botLeave
    • $botOwnerID
    • $callFunction
    • $channelCategoryID
    • $channelExists
    • $channelGuildID
    • $channelID
    • $channelName
    • $channelNSFW
    • $channelSendMessage
    • $channelTopic
    • $channelType
    • $checkCondition
    • $clearAllReactions
    • $clearMessages
    • $clearUserMessages
    • $clientID
    • $clientToken
    • $cloneChannel
    • $color
    • $cooldown
    • $cpu
    • $createContextMenuApplication
    • $createFile
    • $createObject
    • $createSlashCommand
    • $createTextChannel
    • $dbPing
    • $defer
    • $delete
    • $deleteChannels
    • $deletecommand
    • $deleteEmojis
    • $deleteMessage
    • $deleteMessageRow
    • $deleteMessageRows
    • $deleteRoles
    • $description
    • $discriminator
    • $divide
    • $djsEval
    • $editMEssage
    • $editMessageRows
    • $endsWith
    • $ephemeral
    • $eval
    • $executionTime
    • $fetchGuildMembers
    • $filter
    • $footer
    • $formatMS
    • $functionCount
    • $get
    • $getChannelSlowmode
    • $getCooldownTime
    • $getServerInvite
    • $getSlashCommandData
    • $getSlashCommandOption
    • $getTimestamp
    • $getUserBadges
    • $guildID
    • $if
    • $ignoreCode
    • $includes
    • $indexOf
    • $isBot
    • $isNumber
    • $kick
    • $let
    • $log
    • $makeReturn
    • $math
    • $packageName
    • $ram
    • $readyTimestamp
    • $replaceText
    • $round
  • Typedefs
    • ApplicationCommandTypes
    • ButtonStyles
    • ComparisonSymbols
    • ImageSizes
    • SlashCommandOptionProperty
    • SlashCommandProperty
Powered by GitBook
On this page
  • Usage
  • Example

Was this helpful?

  1. Functions

$checkCondition

Checks if the given condition is true or false.

Previous$channelTypeNext$clearAllReactions

Last updated 3 years ago

Was this helpful?

Usage

$checkCondition[value1(comparisonSymbol)value2]

This function has three params.

Param
Description
Type
Required

value1

The value to compare to value 2.

String

Yes

(comparisonSymbol)

The comparison symbol

String

Yes

value2

The value to compare to value 1.

String

Yes

Example

bot.commands.add({
  type: "basicCommand",
  name: "condition",
  code: `Given condition: 1>2
  The given condition is $checkCondition[1>2]`
})
(ComparisonSymbol)