Syntax

Read all about the syntax used by the bot!

Disclaimer!

The Syntax has been inspired from BDFD originally.

We are not affiliated with BDFD. But we're using a similar syntax

Syntax

In general the code only have 2 types:
1- Text
2- Function

What is Text?

In the code anything is text except for function
for example in this code:

Hello $username to our server
1

Hello: is a text
$username: is a function
to our server is a text

What is a function

Any function starts with $ like $username
In this code for example:

Hello $username to our server
1

$username is the only function in this code

But what function does?

Each function in general can do one of the 3 things:

  • Replaced by a value
  • Do an action
  • Replaced by a value and Do an action

For Example In running this code:

Hello $username to our server!
1

When this code runs you will find the bot sending:

Hello Mido to our server!
1

Which clearly shows that $username function is Replaced by value type
and this value will always be the username of the author

Input

Some functions requires an input from you to behave differently and this is the format:

$function[Inputs]
1

Previously we used $username without inputs but why?
because $username documentations will tell you, that by default it will return the author name, but if you want to return someone else username you will need to do an input in this case
Assume that we want to get Rake name instead of Mido
we will first need to get Rake User ID, assume (1234) and input it to $username:

Hello $username[1234]
1

Output

Hello Rake
1

Multiple Inputs

In some function it wants from you more than just 1 input like $channelSendMessage
it asks for 2 different inputs (in order):

  • Channel ID to send to
  • Message Content

Assume that channel id is 1234, and content is Hello $username To apply these inputs in the function, we will separate them by ;
Like this:

$channelSendMessage[1234;Hello $username]
1

Output (in channel with ID 1234):

Hello Mido
1

Note: $channelSendMessage doesn't not get replaced by value, but only does an action (like sending the message)

Function names are case insensitive

It means $authorID and $aUtHoRiD will work!

Expressions

In some functions you might find it tells you:
Provide an expression

In this case, please read about the expressions here

Escaping Characters

There's some danger characters that is troublesome to work with for example let's say you want to send $username to be literally be sent like that and not be replaced to be the user name For example code:

To get username use function: $username
1

You will find the output:

To get username use function: Mido
1

It clearly got replaced by user name, but what to do to tell the bot: treat this $ as literal $ not as function, here comes the escaping character technique, you will simply add \ before that character like this:

To get username use function: \$username
1

Output will be:

To get username use function: $username
1

Some other dangerous characters [, ], ;, :, >, <, =, {, }

Encoded Character Codes (Alternative of \)

#RIGHT# =>> [
#LEFT# =>> ]
#SEMI# =>> ;
#COLON# =>> :
#CHAR# =>> $
#RIGHT_CLICK# =>> >
#LEFT_CLICK# =>> <
#EQUAL# =>> =
#RIGHT_BRACKET# =>> {
#LEFT_BRACKET# =>> }
1
2
3
4
5
6
7
8
9
10