Skip to content
This repository was archived by the owner on Dec 18, 2021. It is now read-only.

Commit 49710e9

Browse files
Update tictactoe.py
1 parent a854b36 commit 49710e9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

examples/games/tictactoe.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
import asyncio
99

1010

11-
class tictactoe(Cog):
11+
class PascalCase(Cog):
1212
def __init__(self, bot):
1313
self.bot = bot
1414

1515

16-
@command(aliases=['tictactoe'])
17-
async def ttt(self, ctx, member: discord.Member):
16+
@command()
17+
async def tictactoe(self, ctx, member: discord.Member):
1818
if ctx.author == member:
1919
return await ctx.send("You can't play against yourself!")
2020
embed = discord.Embed(color=0xF5F5F5, title=f"Hey, {ctx.author.name} wants to play tic-tac-toe with you!")
@@ -61,6 +61,8 @@ async def ttt(self, ctx, member: discord.Member):
6161
"unchosen"
6262
]
6363
]
64+
65+
m = await ctx.send(embed=embed, components=acceptdenycomps, content=member.mention)
6466
def haswon(team):
6567
if selections[0][0] == team and selections[0][1] == team and selections[0][2] == team:
6668
return True
@@ -93,8 +95,6 @@ def istie(team):
9395
return False
9496

9597

96-
m = await ctx.send(embed=embed, components=acceptdenycomps, content=member.mention)
97-
9898
def confirmcheck(res):
9999
return res.user.id == member.id and res.channel.id == ctx.channel.id and str(res.message.id) == str(m.id)
100100

@@ -218,5 +218,5 @@ def redsturncheck(res):
218218

219219
def setup(bot):
220220
print('Tictactoe - by python#0001 has loaded!')
221-
DiscordComponents(bot)
222-
bot.add_cog(tictactoe(bot))
221+
DiscordComponents(bot) #if you have this in an on_ready event you can remove this line.
222+
bot.add_cog(PascalCase(bot))

0 commit comments

Comments
 (0)