(interaction: discord.Interaction)
| 507 | |
| 508 | @client.tree.command(name="protocols", description="List supported protocols.") |
| 509 | async def protocols(interaction: discord.Interaction): |
| 510 | try: |
| 511 | protocol_list = client.shodan.protocols() |
| 512 | formatted_protocols = "\n".join([f"- {protocol}" for protocol in protocol_list]) |
| 513 | |
| 514 | await client.send_split_messages(interaction, formatted_protocols) |
| 515 | except shodan.APIError as e: |
| 516 | await handle_errors(interaction, e, "Shodan API Error") |
| 517 | except Exception as e: |
| 518 | await handle_errors(interaction, e) |
| 519 | |
| 520 | @client.tree.command(name="shodan", description="Advanced and basic Shodan queries. Use `/help` for examples.") |
| 521 | async def search(interaction: discord.Interaction): |
nothing calls this directly
no test coverage detected