|
|
@@ -2,6 +2,7 @@ from discord.ext import commands
|
|
|
import discord
|
|
|
import random
|
|
|
from typing import Optional
|
|
|
+from query.channel import get_games
|
|
|
|
|
|
def setup(bot: commands.Bot):
|
|
|
bot.add_cog(Games(bot))
|
|
|
@@ -19,6 +20,8 @@ class Games(commands.Cog):
|
|
|
help="Roll two dice."
|
|
|
)
|
|
|
async def dice(self, ctx: commands.Context, amount: Optional[int], sides: Optional[int]):
|
|
|
+ if not await get_games(self.bot.pg, ctx.channel.id):
|
|
|
+ return
|
|
|
if not amount:
|
|
|
amount = 2
|
|
|
if not sides:
|
|
|
@@ -46,6 +49,9 @@ class Games(commands.Cog):
|
|
|
name="8ball"
|
|
|
)
|
|
|
async def eightball(self, ctx: commands.Context, *, question: str = None):
|
|
|
+ if not await get_games(self.bot.pg, ctx.channel.id):
|
|
|
+ return
|
|
|
+
|
|
|
if not question:
|
|
|
messages = [
|
|
|
"Don't forget to ask a question...",
|