This bot is designed to allow users to call a "/whitelist" command to privately enter and store their wallet address in a csv file, accessible by the bot host.
To create the bot which you intend to utilise the code, head to the Discord Developer Portal and create a new application. Set the desired Name, Image and Description.
Go to OAuth2->URL Generator setting and enable Bot in the upper section & Send messages in the lower section. This will generate a link at the bottom of the page, enter this into your browser and you'll receive a prompt to add the bot to your server.
Now that the bot is in your server, go to the Bot setting and generate a token. Save this as it will be used later on. (Do not share this token, as anyone who has access to it can control your bot.)
Head to Replit and create an account, then hit the + in the top right corner and create a new python bot (type "Python" in Template). Once created, create both "main.py" and "webserver.py" in the files section, and copy across the code from both relevant files in this repository. Your files should look like this:
On the left hand side, go to "Secrets" which is represented by a lock symbol. Create a new secret called "DISCORD_BOT_SECRET" and add the previously generated token.
Add a new file called "data.csv" and by default add "Username, Wallet address" as the first line. (NOTE: Current version requires 1 entry into the csv file to work). Once completed press "Run" at the top of the page, this will set up the bot and you should see the bot go from Offline to Online in your server.
To easily host your bot 24/7, create an account on UptimeRobot, once created add a new monitor using the "Add New Monitor" button in the top left of the page.
Select the Monitor type as "HTTP(s)" and then to get the URL, go back to your Replit application and copy the URL that it generates in the Webview tab. Once those are selected, press "Create Monitor" (There may be a popup about free/paid versions).
-allow users to edit their wallet address inside the csv file to reduce administration time.
-allow users to check their wallet address inside the csv file.