mirror of
				https://gitlab.com/ceda_ei/Quadnite-Bot
				synced 2025-10-31 17:20:05 +01:00 
			
		
		
		
	Make bot immortal.
This commit is contained in:
		| @@ -211,8 +211,13 @@ function yes_or_no() | |||||||
| // Kill yourself | // Kill yourself | ||||||
| function kys() { | function kys() { | ||||||
|   global $decoded; |   global $decoded; | ||||||
|  |   global $bot_name; | ||||||
|   $kys = file('kys.txt'); |   $kys = file('kys.txt'); | ||||||
|   $random_kys = $kys[rand(0,count($kys)-1)]; |   $random_kys = $kys[rand(0,count($kys)-1)]; | ||||||
|  |   if ($decoded->{'message'}->{'reply_to_message'}->{'from'}->{'username'} == $bot_name){ | ||||||
|  |     send_text("I can't be killed.", true); | ||||||
|  |     return; | ||||||
|  |   } | ||||||
|   if (isset($decoded->{'message'}->{'reply_to_message'})) { |   if (isset($decoded->{'message'}->{'reply_to_message'})) { | ||||||
|     if (isset($decoded->{'message'}->{'reply_to_message'}->{'from'}->{'username'})){ |     if (isset($decoded->{'message'}->{'reply_to_message'}->{'from'}->{'username'})){ | ||||||
|       $username = '@' . $decoded->{'message'}->{'reply_to_message'}->{'from'}->{'username'}; |       $username = '@' . $decoded->{'message'}->{'reply_to_message'}->{'from'}->{'username'}; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user