The online racing simulator
Discord user verification
The user will use a command in the game and get a random code, the code will be added to the user's database, then the user will type the username and the given code in the discord channel, for example arda556 984567. If the user and the typed verification code match, it will add the username to the .txt file.
However, I have some deficiencies below, for example, I don't know what to write instead of blabla and how to understand that the code is correct

IF($ChannelID=="1176206494891507843")
THEN
$idxOfFirstSpace = indexOf( $Text, " ");
IF( $idxOfFirstSpace == -1 )
THEN
$Message = "```Hello ".$UName." | You did not type your username or Verification code!```";
$DiscordChannel = "1176206494891507843";
sendmessagetodiscord($DiscordChannel,$Message)
ELSE
$Message = "```Hello ".$UName." | Your verification code matched!```";
$DiscordChannel = "1176206494891507843";
sendmessagetodiscord($DiscordChannel,$Message)
MoveUserToGroup( "dcverify",$blabla );
UserGroupToFile( "dcverify", $Dir["dcverify"] );
ENDIF
ENDIF

CASE "!dcdogrula":
$userName = GetCurrentPlayerVar( "UserName" );
$random = round(ToNum(RandomNum(10000,20000)),0)."";

privmsg("Discord kod: ". $random);
setUserStoredValue($userName, "randomkod", $random);
BREAK;

Questions like these can often be answered by checking the file: Changes.txt

The syntax for MoveUserToGroup is: MoveUserToGroup( group, user );

So $blabla should be replaced by the username.
If $UName is the LFS username, you could that.
Otherwise you should use this code:

$userName = GetCurrentPlayerVar("UserName");
Then replace $blabla with $userName
The codes work logically. Now, what you need to think about is integrating it with the sqlite3 discord bot, which is the database of lapper. 1- Create a bot 2- Establish a sqlite3 connection with the bot you created and connect to dbs 3- Then set up a bot interface suitable for use This will throw you into some logical problems and you will be confused about which way to follow. There are many ways to do this, but you should choose the simplest one.
So let me briefly write what I want, how can I get what is written before the space and what is written after the space?
I don't understand what you mean by emptiness.
So for example, when arda556 writes 9546, how can I get arda556 and 9546? Below is a slightly similar example

$idxOfFirstSpace = indexOf( $Text, " ");
You cannot do this with the bot provided by lapper, it does not meet the things you can do, you should try to make an independent bot, lapper will not work for you.
Let's skip the bot, then can't we separate the lines even in a normal command !dc arda556 6849, for example, if I can separate the numbers by username, it will be very good and what I want will be completed
** Best answer **
CASE "!dc":
IF ( $argv != "" )
THEN
$idxSpace = indexOf( $argv, " ");
IF ( $idxSpace != -1 )
THEN
$verifycode = subStr( $argv,0,$idxSpace );
$argv = trim( subStr( $argv,$idxSpace ) );

GlobalMsg( strformat("Kullanıcı adı ".$argv.) );
GlobalMsg( "^8^TVerify Code : ^1". $verifycode . );


ELSE
privMsg ( "^7^TYanlış Komut. ^3!yardim Yazıp Komutlara Bakabilirsiniz." );
ENDIF
ELSE
privMsg ( "^7^TYanlış Komut. ^3!yardim Yazıp Komutlara Bakabilirsiniz." );

ENDIF
BREAK;

As far as I understand, this code may work for you.
Please, keep the conversation in English, so everyone is able to follow it.(and maybe contribute to it as well)
It escaped my mind while translating, so I corrected it.
Quote from Androphp :
CASE "!dc":
IF ( $argv != "" )
THEN
$idxSpace = indexOf( $argv, " ");
IF ( $idxSpace != -1 )
THEN
$verifycode = subStr( $argv,0,$idxSpace );
$argv = trim( subStr( $argv,$idxSpace ) );

GlobalMsg( strformat("Kullanıcı adı ".$argv.) );
GlobalMsg( "^8^TVerify Code : ^1". $verifycode . );


ELSE
privMsg ( "^7^TYanlış Komut. ^3!yardim Yazıp Komutlara Bakabilirsiniz." );
ENDIF
ELSE
privMsg ( "^7^TYanlış Komut. ^3!yardim Yazıp Komutlara Bakabilirsiniz." );

ENDIF
BREAK;

As far as I understand, this code may work for you.

Thanks this will come in handy for me!

FGED GREDG RDFGDR GSFDG