Aggiornare 'mybot.php'
Eliminato il comando cerca (mai usato e funzionava non benissimo) e aggiunto l'include per postare automaticamente su codeberg
This commit is contained in:
		
							
								
								
									
										28
									
								
								mybot.php
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								mybot.php
									
									
									
									
									
								
							| @@ -20,8 +20,12 @@ $text 				= $telegram->Text(); | ||||
| $chat_id			= $telegram->ChatID(); | ||||
| $message_id			= $telegram->MessageID(); | ||||
| $username			= $telegram->Username(); | ||||
|  | ||||
|  | ||||
| $replymessagetext	= $data['message'] [reply_to_message] ['text']; | ||||
| $userID				= $telegram->UserID(); | ||||
| $grouptitle			= $telegram->messageFromGroupTitle(); | ||||
| $usernamegroup		= $data['message'] [chat] ['username']; | ||||
| $usernamereply		= $data['message'] [reply_to_message] ['from'] ['username']; | ||||
| $replymessageid		= $data['message'] [reply_to_message] ['message_id']; | ||||
|  | ||||
| include("frasi.php"); | ||||
|  | ||||
| @@ -73,26 +77,10 @@ Questo bot si può utilizzare in due modi:\n\n<b>· Inline:</b> prova a tagg | ||||
| 	$telegram->sendMessage($content); | ||||
| 	} | ||||
| 	 | ||||
| if (stripos($text, "cerca") === 0) { | ||||
| $searchquery = substr($text, 6); | ||||
| 	$url = "https://www.lealternative.net?s=".$searchquery.""; | ||||
| 	$content = array( | ||||
| 		'chat_id' => $chat_id, | ||||
| 		'text' => "Clicca sul pulsante qui sotto  per cercare direttamente sul sito <b>LeAlternative</b>", | ||||
| 'reply_markup' =>json_encode([ | ||||
| 'inline_keyboard'=>[ | ||||
| [ | ||||
|   ['text'=>'Cerca '.$searchquery.' su LeAlternative','url' => $url], | ||||
| ] | ||||
| 	]]), | ||||
| 'parse_mode' => 'HTML', | ||||
| 'disable_web_page_preview' => true | ||||
| 	); | ||||
| 	$telegram->sendMessage($content); | ||||
| 	} | ||||
| // CODEBERG | ||||
| include("codebergpost.php");	 | ||||
|  | ||||
| // BLACKLIST | ||||
|  | ||||
| include("blacklist.php");	 | ||||
| 	 | ||||
| ?> | ||||
		Reference in New Issue
	
	Block a user