Queries OpenSea APIs and posts to a specified channel in your Discord server.
Built with 💙 and:
- NinjaWebSocket - Lightweight, user-friendly WebSocket APIs
- OpenSeaHttpClient - SDK for the OpenSea marketplace API
Support for multiple marketplaces: https://github.com/ninjastacktech/discord-eth-nft-sales-bot (instead of polling OpenSea API, it subscribes to Ethereum websocket events)
var bot = new NinjaBot(new NinjaBotOptions
{
DiscordBotToken = "<discord_bot_token>",
DiscordChannelId = "<discord_channel_id>",
DiscordWebhookUrl = "<discord_webhook_url>",
OpenSeaApiKey = "<opensea_api_key>",
OpenSeaCollectionSlug = "<collection_slug>",
PollingIntervalSeconds = 60000,
});
await bot.StartAsync();
OpenSeaApiKey [required]
. The OpenSea API Key. Request one here: https://docs.opensea.io/reference/request-an-api-keyOpenSeaCollectionSlug [required]
. The name of the collection on OpenSea.DiscordBotToken [required]
. Create an application using theDiscord Developer Portal
and then create a bot within that application that has permissions to post messages.DiscordChannelId [required]
. The id of the channel you want the bot to post into. Get this by turning onDeveloper Mode
in Discord, then click the channel settings icon.DiscordWebhookUrl [required]
. Recommended option (automatically restricts the bot to only post to the specified channel). You can either set the webhook URL or the bot token & channel id.PollingIntervalSeconds [optional]
. How often should the bot query OpenSea API (default: 60 seconds).