Advertisement
Guest User

Codice

a guest
Aug 19th, 2019
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.62 KB | None | 0 0
  1. <?php
  2.  
  3. //bot creato da @Nixrl
  4.  
  5. $botToken = "vorresti vederlo eheh";
  6. $website = "https://api.telegram.org/bot".$botToken;
  7.  
  8.  
  9. $update = file_get_contents('php://input');
  10. $update = json_decode($update, TRUE);
  11.  
  12. $chatId = $update['message']['from']['id'];
  13. $nome = $update['message']['from']['first_name'];
  14. $text = $update['message']['text'];
  15.  
  16. switch($text)
  17. {
  18.   case "/start":
  19.       sendMessage($chatId, "Benvenuto/a <b>$nome</b>😁,
  20. usa /register per registrarti sul bot!
  21.  
  22. <code>Created by</code> @Nixrl
  23. <code>Helped by</code> @MamoruEndo");
  24.       break;
  25.   case "/register":
  26.           sendMessage($chatId, "Ok, ti sei registrato con successo✅
  27. <code>Usando nuovamente questo comando non ci si registrerà più ma si farà aggiornare il proprio account nei nostri database.</code>");
  28.       break;
  29.   case "/regole":
  30.           sendMessage($chatId, "⚠️<b>Regole del bot</b>⚠️
  31.  
  32. 1. <b>Tutte</b> le <b>informazioni cercate</b> saranno inerenti solo ed esclusivamente alla modalità <b>Battle Royale</b> del gioco <b>Fortnite</b>.
  33.  
  34. 2. Alcune <b>parole</b>, se <b>cercate</b>, daranno come risultato un <b>messaggio</b> che comunicherà la <b>motivazione dell'errore</b>.
  35.  
  36. 3. È <b>assolutamente vietato</b> contattare i membri dello Staff per <b>spammare</b> <code>link/canali</code> di un <b>qualsiasi social</b>.
  37.  
  38. Eventuali attacchi da parte di <code>hacker/cracker</code> verranno risolti attraverso la <b>polizia postale</b>👮🏻‍♂️
  39.  
  40. Per <b>qualsiasi problema</b> con il bot scrivere <b>solo</b> a <a href='t.me/Nixrl'>Nixrl</a> o a <a href='t.me/MamoruEndo'>MamoruEndo</a>.");
  41.      break;
  42.   case "/funzionamento":
  43.           sendMessage($chatId, "<code>comando in manutenzione.</code>");
  44.      break;
  45.      case "/termini":
  46.              sendMessage($chatId, "<code>comando in manutenzione.</code>");
  47.         break;
  48.      case "/sito":
  49.                 sendMessage($chatId, "Ok <b>$nome</b>, <a href='https://curiosocomejonesy.yolasite.com'>clicca qui</a> per andare al <b>sito</b>!");
  50.            break;
  51.   default:
  52.       sendMessage($chatId, "Scusa <b>$nome</b>😕,
  53. questa parola non può essere cercata perchè <b>viola</b> le <code>linee di sicurezza del bot</code> oppure <code>deve ancora essere aggiunta</code>.
  54. Per visualizzare i <code>termini di servizio</code> e <code>le linee di sicurezza</code> <a href='https://pastebin.com/tZtX9U05'>clicca qui</a>.");
  55.       break;
  56.  
  57. //le parole bandite sono comprese nella function default
  58. }
  59.  
  60. function sendMessage($chatId, $text)
  61.     {
  62.   $url = $GLOBALS[website]."/sendMessage?chat_id=$chatId&parse_mode=HTML&text=".urlencode($text);
  63.   file_get_contents($url);
  64. }
  65.  
  66.  ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement