Discord bot for interacting with the Solana blockchain.
- Create an application in the Discord Developer Panel using the material from the
/branding
directory. - Create a bot in the Bot -> Add Bot section of the Developer Panel.
- Invite the bot to your server using the following link:
https://discord.com/api/oauth2/authorize?client_id=<YOUR_APPLICATION_CLIENT_ID>&permissions=8&scope=applications.commands%20bot
where<YOUR_APPLICATION_CLIENT_ID>
is the Application ID available in the General Information tab of the Developer Panel. - Ensure bot has administrator privileges via an assigned role.
- Clone the repo onto your own machine using
git clone https://github.com/cappycap/SolanaPal.git
. - Update the
.env.example
file with your own variables, then rename it to.env
- Open up a terminal, navigate to repo directory, then run
npm install
to install dependencies. - Run
npm run register
to register the bot's commands with Discord API. - Run
npm run bot
to spin up the bot. - Test the bot on your server!
/ping
- What is a bot without an epic ping command?
/nfts <address>
- View a catalog of owned NFTs for a given address.
/profile <address>
- View a basic profile for a given address including Solana balance and transaction history.
/linkwallet
- Begin the process to link a Solana wallet to your Discord.
/pay <address> <amount>
- Available after linking your wallet, pay a given address a specified amount in SOL.
- Discord.js for their bot library to interact with Discord API.
- @solana/web3.js for their Solana library.
- @metaplex/js for their library to interact with the Metaplex API.