.. polling-bot documentation master file, created by sphinx-quickstart on Sat Apr 1 18:06:03 2023. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to polling-bot's documentation! ======================================= .. role:: bash(code) :language: bash polling-bot is a Discord bot to conduct basic polling functions in a Discord server. Setup ====== To setup the Discord bot, follow the steps below: 1. Navigate to http://discordapp.com/developers/applications and create an account, or login if you already have a Discord account. 2. Select "New Application" and give it a name ie. "polling-bot" 3. Navigate to the Bot tab on the left side menu, and click "Add Bot" and confirm. 4. Under the TOKEN section, click "Copy" and copy the token. 5. To add the bot to your Discord server, select the OAuth2 tab from the left side menu. From the SCOPES section, select bot option and from the BOT PERMISSIONS section, select Administrator. Copy and navigate to the generated URL and select the server you want to add the bot to from the dropdown, then click "Authorize." Next, install polling-bot with pip: :bash:`pip install polling-bot` Finally, to run the bot, import and run it as follows: .. code-block:: python import discord pollingbot = __import__("polling-bot") bot = pollingbot.PollingBot(intents=discord.Intents.all(), command_prefix="/") bot.run('TOKEN') Where token is the token copied from the Developer Portal above. The bot will now be responsive to commands in your Discord server. Available Commands ================== :bash:`/poll` - Starts a poll in the server .. image:: demos/poll.png :width: 300 :alt: Example usage of /poll command :bash:`/add choice ` - Add choices to the poll .. image:: demos/add.png :width: 300 :alt: Example usage of /add name command :bash:`/edit