DISCORD BOT

For NFT Communities

image of bot profile picture

I worked with a partner for about a month to build a deployable Discord bot to be used for NFT-focused communities. The bot was named Argus, and it made a number of operations more streamlined and easier for Discord server administrators. These operations were executed by “slash commands” so that when an admin typed the command into the server chat, Python code was executed on the back-end.

/setup


This slash command was created for a one-time use in a server. Once the admin sends “/setup” in the chat (usually in a blank, empty Discord server), the server would then be initialized with a template similar to popular NFT communities. The simple command would create multiple text channels, voice channels, and roles. The roles would be set up in a hierarchy, such that certain roles had more admin-like permissions an certain channels were limited to select roles. Additionally, in order to prevent accidents, if the command was entered by mistake, the admin would have to input a second confirmation, otherwise the command would time out. The setup command could also be undone.

/opensea


OpenSea is a marketplace for NFTs, and Discord mods often like to track these sales of NFT contracts. When an admin would type the command with an NFT contract number, the bot would begin “tracking” that contract. So, when any sort of sale was made, a message containing the NFT thumbnail, name, collection, price, etc. were sent to that text channel. This was done through constant GET requests using the OpenSea API. This made it much easier for communities to see how well an NFT collection is selling.

Other Commands


As /setup and /opensea were the most involved commands, the majority of my effort was put into those. Here is a list of some of the other commands Argus could perform.


/create_giveaway

Creates a giveaway with a specified prize and time, and selects a winner randomly when the time is up.


/reroll

Reroll a previously created giveaway for a number of winners.


/poll

Creates a poll with a max of 10 options that ends at a specified time.


/reaction_roles

Creates an embed so that when users react with given emojis, they will be assigned a corresponding role.


/get_blacklist

Displays a list of users currently blacklisted from the server.


/record

Records the wallet address for a user.


/whitelist

Calls button for whitelist members to enter their whitelist address.