This is a minimal example of how to leverage 1Shot API in a Discord Bot.
Visit the Discord application console and create a new bot. You'll need to generate a bot token and keep it somewhere safe.
Log into 1Shot and create a new API key and secret from the API Keys page. You'll need both the client ID and secret for your bot.
Also, go to the Organizations page and click on the "Details" button of your org. Grab the business ID from the url.
Make sure you have created and funded an Escrow Wallet on the Sepolia Network. On the Endpoints page, import 0xA1BfEd6c6F1C3A516590edDAc7A8e359C2189A61 on the Sepolia testnet.
Click on the details of the function deployToken and the the endpoint Id.
Clone this repo and build the bot container image:
docker build -t bot . Gather your Discord bot token, API key and secret, business id, and endpoint id to run the bot container:
docker run -d --rm --name bot -e DISCORD_BOT_TOKEN=<get-a-token-from-discord> -e API_KEY=<1Shot-API-Key> -e API_SECRET=<1Shot-API-Secret> -e BUSINESS_ID=<Your-1Shot-Busines-ID> -e ENDPOINT_ID=<deployToken-endpoint-id> botAdd the bot to you server and invoke /deploy_token.

