naulicu

Untitled

Dec 8th, 2021 (edited)
1,188
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PHP Fatal error:  Uncaught skrtdev\NovaGram\CurlException: SSL certificate problem: self signed certificate in certificate chain in C:\Users\noise\Documents\Projects\nova-tg.loc\vendor\skrtdev\novagram\src\NovaGram\Utils.php:93
  2. Stack trace:
  3. #0 C:\Users\noise\Documents\Projects\nova-tg.loc\vendor\skrtdev\novagram\src\NovaGram\Bot.php(425): skrtdev\NovaGram\Utils::curl()
  4. #1 C:\Users\noise\Documents\Projects\nova-tg.loc\vendor\skrtdev\novagram\src\NovaGram\Methods.php(65): skrtdev\NovaGram\Bot->APICall()
  5. #2 C:\Users\noise\Documents\Projects\nova-tg.loc\vendor\skrtdev\novagram\src\NovaGram\Bot.php(339): skrtdev\NovaGram\Bot->getWebhookInfo()
  6. #3 C:\Users\noise\Documents\Projects\nova-tg.loc\index.php(35): skrtdev\NovaGram\Bot->start()
  7. #4 {main}
  8.   thrown in C:\Users\noise\Documents\Projects\nova-tg.loc\vendor\skrtdev\novagram\src\NovaGram\Utils.php on line 93
  9.  
  10.  
  11. <?php
  12. if (file_exists('vendor')) {
  13.     require 'vendor/autoload.php';
  14. }
  15. else{
  16.     if (!file_exists('novagram.phar')) {
  17.         copy('https://novagram.ga/phar', 'novagram.phar');
  18.     }
  19.     require_once 'novagram.phar';
  20. }
  21.  
  22. use skrtdev\NovaGram\Bot;
  23. use skrtdev\Telegram\Message;
  24.  
  25. $token = '1111111111111';
  26. $Bot = new Bot($token, [
  27.     'mode' => Bot::CLI,
  28.     'disable_auto_webhook_set' => true,
  29. ]);
  30.  
  31.  
  32. $Bot->addErrorHandler(function (Throwable $e) use ($Bot) {
  33.     $Bot->debug( (string) $e );
  34. });
  35.  
  36. $Bot->onMessage(function ($message) {
  37.     $chat = $message->chat;
  38.     if(isset($message->text)){
  39.         $this::sendMessage($chat->id, "This is the text of a Message", [
  40.             "reply_to_message_id" => $message->id
  41.         ]);
  42.     }
  43. });
  44.  
  45. $Bot->start();
RAW Paste Data