Answer the question
In order to leave comments, you need to log in
How to make a "report" command?
The bottom line is that the "report" command was made, the essence is that the user writes this command, and then let's say what and where the bug he found. The bot sends that its message has been sent to the admin, i.e. me in pm.
But something went wrong, please help
if($cmd == "репорт"){
$vk->sendMessage($peer_id, $id, "@id{$id} Напишите что (Вы) хотите отправить, (Вы) можете отправить найденный баг или предложить что-то новое");
}else{
$vk->sendMessage($peer_id, $id, "@id{$id} (Ваше) сообщение отправлено администратору");
}
}
Answer the question
In order to leave comments, you need to log in
And what could go well there, if you process this command in the same way as others, that is, copy paste
you need to do this:
user -> report [text] -> sendToAdmin[!adminHasReport ? [report_text +"\nEnter a response to this report in the next message"] : "A new report has arrived! Finish with the previous one" ]
admin -> [report_answer] -> sendToUser [report_answer] -> sendToAdmin[hasReports ? [report_text] : "No more reports"]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question