Understanding variables

To have a complete knowledge of SnapeBot’s variables you should have a look at VariablesMaker.php file of the source code.

It works in the following way:

I know it looks pretty difficult to understand, but maybe it’ll be clearer with the following example.

e.g.:

The user @Nen3one, with user ID 304949284, sends the message /start to the bot.

$SnapeBot->username becomes @Nen3one

$SnapeBot->userID becomes 304949284

$SnapeBot->msg becomes /start

and so on.

The name of the variables are in the VariablesMaker.php file of the source code.

Next section