✨ Converted all hangman functionality to slash commands
This commit is contained in:
@ -99,16 +99,16 @@ class HangmanCog(commands.Cog):
|
||||
def __init__(self,bot):
|
||||
"""Runs game stuff."""
|
||||
self.bot = bot
|
||||
|
||||
# Starts a game of Hangman
|
||||
@cog_ext.cog_subcommand(**params["hangmanStart"])
|
||||
async def hangmanStart(self, ctx):
|
||||
await ctx.defer()
|
||||
await self.bot.games.gameLoops.runHangman(ctx.channel,"#"+str(ctx.author.id),"start", ctx)
|
||||
await self.bot.games.hangman.start(ctx)
|
||||
|
||||
# Stops a game of Hangman
|
||||
@cog_ext.cog_subcommand(**params["hangmanStop"])
|
||||
async def hangmanStop(self, ctx):
|
||||
await self.bot.games.gameLoops.runHangman(ctx.channel,"#"+str(ctx.author.id),"stop", ctx)
|
||||
await self.bot.games.hangman.stop(ctx)
|
||||
|
||||
|
||||
class HexCog(commands.Cog):
|
||||
@ -147,6 +147,7 @@ class HexCog(commands.Cog):
|
||||
async def hexPlace(self, ctx, coordinates):
|
||||
await self.bot.games.gameLoops.runHex(ctx, "place "+coordinates, "#"+str(ctx.author.id))
|
||||
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(GamesCog(bot))
|
||||
bot.add_cog(BlackjackCog(bot))
|
||||
|
Reference in New Issue
Block a user