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
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;