HugeBob

Elections Discord Bot

Jun 15th, 2021
672
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # bot.py
  2. import os
  3.  
  4. import discord
  5. from discord.ext import commands
  6.  
  7. #import pandas as pd
  8.  
  9. TOKEN = ''
  10.  
  11. client = discord.Client()
  12.  
  13. users = [191001482324213760,771444130823667714,368114537460924417]
  14. candidates = []
  15. votes = []
  16. winners = []
  17. numWinners = 9
  18. elections = ""
  19.  
  20. @client.event
  21. async def on_ready():
  22.     print(f'{client.user} has connected to Discord!')
  23.     await client.change_presence(activity=discord.Game(" with Democracy"))
  24.  
  25. @client.event
  26. async def on_message(message):
  27.     if (message.author != client.user and message.server is None and message.author.id in users):
  28.        
  29.         if (elections == ""):
  30.             return
  31.         elif (elections == "FPP"):
  32.            
  33.         elif (elections == "SecondPR"):
  34.            
  35.         elif (elections == "STV"):
  36.            
  37.         elif (elections == "SuperDelegate"):
  38.            
  39.         await message.author.send(embed=embedVar)
  40.     return
  41.  
  42. client.run(TOKEN)
RAW Paste Data