just set it in a variable so you don't have to change it everywhere
Yes php
Nice but can i add 2 bots in one script?
$TOKEN = empty($token1) ? $token2 : $token1;
Any script available please?
You can add infinite bots in one script
Do you have script example?
Sure I have in my laptop I'll send you tomorrow if you're interested
I have never worked like this before, but it is possible
What is the problem?
It's a short style for if statement. Basically empty ($token1) is the condition and after ? is the if block and after : is the else block
It's exist on github but so hard
Wait edit this if (empty(getenv('BOT_TOKEN'))){ $token = "YOUR_API_TOKEN"; } else { $token = getenv('BOT_TOKEN'); }
🤔 You'd better copy your script, and form two separate robots
Do you work with hosts?
What's that? Heroku
$token= empty (getenv('bot_token')) ? "Your..." : getenv('....
umm, I did not work much with Heroku because it needs a gate hub
Обсуждают сегодня