fix rejection
This commit is contained in:
		
							
								
								
									
										17
									
								
								garfbot.py
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								garfbot.py
									
									
									
									
									
								
							| @@ -240,29 +240,14 @@ async def on_message(message): | |||||||
|             target = query[-1] |             target = query[-1] | ||||||
|             if is_private(target): |             if is_private(target): | ||||||
|                 rejection = await generate_chat_response("Hey Garfield, I am hacking your computer network.") |                 rejection = await generate_chat_response("Hey Garfield, I am hacking your computer network.") | ||||||
|  |                 await message.channel.send(rejection) | ||||||
|             else: |             else: | ||||||
|                 result = subprocess.run(['ping', '-c', '4', target], capture_output=True, text=True) |                 result = subprocess.run(['ping', '-c', '4', target], capture_output=True, text=True) | ||||||
|                 await message.channel.send(f"`Ping result for {target}: {result.stdout}`") |                 await message.channel.send(f"`Ping result for {target}: {result.stdout}`") | ||||||
|         except Exception as e: |         except Exception as e: | ||||||
|             await message.channel.send(f"`GarfBot Error: {str(e)}`") |             await message.channel.send(f"`GarfBot Error: {str(e)}`") | ||||||
|  |  | ||||||
|     # if message.content.lower().startswith("garfdns "): |  | ||||||
|     #     try: |  | ||||||
|     #         query = message.content.split() |  | ||||||
|     #         target = query[-1] |  | ||||||
|     #         result = subprocess.run(['nslookup', target], capture_output=True, text=True) |  | ||||||
|     #         await message.channel.send(f"`Ping result for {target}: {result.stdout}`") |  | ||||||
|     #     except Exception as e: |  | ||||||
|     #         await message.channel.send(f"`GarfBot Error: {str(e)}`") |  | ||||||
|  |  | ||||||
|     # if message.content.lower().startswith("garfhack "): |  | ||||||
|     #     try: |  | ||||||
|     #         query = message.content.split() |  | ||||||
|     #         target = query[-1] |  | ||||||
|     #         result = subprocess.run(['ping', '-c', '1', target], capture_output=True, text=True) |  | ||||||
|     #         await message.channel.send(f"`Ping result for {target}: {result.stdout}`") |  | ||||||
|     #     except Exception as e: |  | ||||||
|     #         await message.channel.send(f"`GarfBot Error: {str(e)}`") |  | ||||||
|  |  | ||||||
|     # Kroger Shopping |     # Kroger Shopping | ||||||
|     if message.content.lower().startswith("garfshop "): |     if message.content.lower().startswith("garfshop "): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user