Skip to content

Commit

Permalink
Merge pull request #19 from khanjason/Development
Browse files Browse the repository at this point in the history
New Patch- New Error Messages for failed startSessions
  • Loading branch information
khanjason authored Nov 21, 2020
2 parents d60f210 + 76b63da commit c6b0172
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cogs/Chair.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ async def startSession(self, ctx):
else:
await connected.channel.connect()
await ctx.channel.send("Session has started!")

else:
embedVar = discord.Embed(title="Error", description="Please join a voice channel.", color=discord.Color.from_rgb(78,134,219))
await ctx.send(embed=embedVar)
@startSession.error
async def startSession_error(c,ctx, error):
if isinstance(error, commands.MissingRole):
embedVar = discord.Embed(title="Error", description="The 'Chair' role is required to run this command.", color=discord.Color.from_rgb(78,134,219))
await ctx.send(embed=embedVar)
@commands.has_role('Chair')
@commands.command(brief='Ends the current Session.', description='Disables session commands and disconnects bot from voice channel.\n Clears GS list.')
async def endSession(self, ctx):
Expand Down

0 comments on commit c6b0172

Please sign in to comment.