MCPcopy Create free account
hub / github.com/RocketGod-git/shodanbot / protocols

Function protocols

main.py:509–518  ·  view source on GitHub ↗
(interaction: discord.Interaction)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 2

handle_errorsFunction · 0.85
send_split_messagesMethod · 0.80

Tested by

no test coverage detected