Scrim Scheduler
This project was a Discord bot that I programmed to allow myself and fellow team captains in the Purdue Overwatch Club to schedule scrimmages more easily. We typically ping our teams and wait until we have 6 reactions to begin searching for a scrimmage/practice match, but there are a lot of reasons why that is inefficient and tedious. That is why I created this bot that will ping our teams for us and notify the team captains when all 6 players have reacted.
* This project is still a work in progress and all elements may not work as intended when run.
** This preview may not include the full project. All files are uploaded to my GitHub.
""" Full code uploaded to GitHub """ import discord import os import requests from pathlib import Path from discord.ext import commands author = "" bot = commands.Bot(command_prefix = '!') bot.remove_command('help') @bot.event async def on_ready(): print('login successful') @bot.command() async def scrim(context, role): await context.send(role + " react for scrim") author = context.author @bot.event async def on_reaction_add(reaction, user): reacts = set() global author channel = reaction.message.channel async for user in reaction.users(): reacts.add(user) print(reacts) if len(reacts) == 6: await channel.send(author.mention + " 6 reactions! Scrim time :)") @bot.command() @commands.has_permissions(kick_members=True) async def kick(ctx, member: discord.Member, *, reason=None): if reason==None: reason=" no reason provided" await ctx.guild.kick(member) await ctx.send(f'User {member.mention} has been kicked for {reason}') bot.run(os.getenv('ScrimBotKey'))""" Full code uploaded to GitHub """