✨
This commit is contained in:
@ -32,7 +32,7 @@ class MiscCog(commands.Cog):
|
||||
@cog_ext.cog_slash(**params["help"])
|
||||
async def help_command(self, ctx: SlashContext, command=""):
|
||||
"""Get help for commands."""
|
||||
await self.bot.other.helpFunc(ctx, command)
|
||||
await self.bot.other.help_func(ctx, command)
|
||||
|
||||
@cog_ext.cog_slash(**params["thank"])
|
||||
async def thank(self, ctx: SlashContext):
|
||||
@ -42,37 +42,37 @@ class MiscCog(commands.Cog):
|
||||
@cog_ext.cog_slash(**params["hello"])
|
||||
async def hello(self, ctx: SlashContext):
|
||||
"""Greet the bot."""
|
||||
await self.bot.other.helloFunc(ctx)
|
||||
await self.bot.other.hello_func(ctx)
|
||||
|
||||
@cog_ext.cog_slash(**params["roll"])
|
||||
async def roll(self, ctx: SlashContext, dice="1d20"):
|
||||
"""Roll dice."""
|
||||
await self.bot.other.rollDice(ctx, dice)
|
||||
await self.bot.other.roll_dice(ctx, dice)
|
||||
|
||||
@cog_ext.cog_slash(**params["image"])
|
||||
async def image(self, ctx: SlashContext):
|
||||
"""Get a random image from Bing."""
|
||||
await self.bot.other.imageFunc(ctx)
|
||||
await self.bot.other.image_func(ctx)
|
||||
|
||||
@cog_ext.cog_slash(**params["movie"])
|
||||
async def movie(self, ctx: SlashContext):
|
||||
"""Get a random movie from the Plex server."""
|
||||
await self.bot.other.movieFunc(ctx)
|
||||
await self.bot.other.movie_func(ctx)
|
||||
|
||||
@cog_ext.cog_slash(**params["name"])
|
||||
async def name(self, ctx: SlashContext):
|
||||
"""Generate a random name."""
|
||||
await self.generators.nameGen(ctx)
|
||||
await self.generators.name_gen(ctx)
|
||||
|
||||
@cog_ext.cog_slash(**params["tavern"])
|
||||
async def tavern(self, ctx: SlashContext):
|
||||
"""Generate a random tavern name."""
|
||||
await self.generators.tavernGen(ctx)
|
||||
await self.generators.tavern_gen(ctx)
|
||||
|
||||
@cog_ext.cog_slash(**params["wiki"])
|
||||
async def wiki(self, ctx: SlashContext, wiki_page=""):
|
||||
"""Get a page on a fandom wiki."""
|
||||
await self.bot.other.findWikiPage(ctx, wiki_page)
|
||||
await self.bot.other.find_wiki_page(ctx, wiki_page)
|
||||
|
||||
@cog_ext.cog_slash(**params["add_movie"])
|
||||
async def add_movie(self, ctx: SlashContext, movie):
|
||||
@ -92,7 +92,7 @@ class MiscCog(commands.Cog):
|
||||
@cog_ext.cog_slash(**params["wolf"])
|
||||
async def wolf(self, ctx: SlashContext, query):
|
||||
"""Perform a search on Wolfram Alpha."""
|
||||
await self.nerd_shit.wolfSearch(ctx, query)
|
||||
await self.nerd_shit.wolf_search(ctx, query)
|
||||
|
||||
|
||||
def setup(bot):
|
||||
|
@ -108,7 +108,7 @@ class ConnectFour(BoardGame):
|
||||
await self.bot.defer(ctx)
|
||||
channel = str(ctx.channel_id)
|
||||
|
||||
opponent_info = await self._test_opponent(ctx, opponent)
|
||||
opponent, opponent_info = await self._test_opponent(ctx, opponent)
|
||||
if not opponent_info:
|
||||
return
|
||||
|
||||
@ -119,7 +119,7 @@ class ConnectFour(BoardGame):
|
||||
players = [ctx.author.id, opponent]
|
||||
random.shuffle(players)
|
||||
|
||||
self.draw.draw_image(channel, board, players, [0, [0,0], ""], players)
|
||||
self.draw.draw_image(channel, board, players, [0, [0,0], ""])
|
||||
|
||||
opponent_name = self.get_name(f"#{opponent}")
|
||||
turn_name = self.get_name(f"#{players[0]}")
|
||||
@ -252,7 +252,11 @@ class ConnectFour(BoardGame):
|
||||
if placed_piece:
|
||||
channel = str(ctx.channel)
|
||||
self.draw.draw_image(
|
||||
channel, board, winner, win_coordinates, win_direction, players)
|
||||
channel,
|
||||
board,
|
||||
players,
|
||||
[winner, win_coordinates, win_direction]
|
||||
)
|
||||
|
||||
|
||||
boards_path = "gwendolyn/resources/games/connect_four_boards/"
|
||||
|
@ -189,7 +189,7 @@ class BoardGame(GameBase):
|
||||
self.bot.log("They tried to play against themself")
|
||||
return False
|
||||
|
||||
return difficulty, difficulty_text
|
||||
return opponent, (difficulty, difficulty_text)
|
||||
|
||||
class BaseDrawer():
|
||||
"""Class for drawing games."""
|
||||
|
@ -632,7 +632,7 @@ class DrawHangman():
|
||||
|
||||
random.seed(game_id)
|
||||
|
||||
background = Image.open("gwendolyn/resources/paper.jpg")
|
||||
background = Image.open("gwendolyn/resources/games/default_images/hangman.png")
|
||||
gallow = self._draw_gallows()
|
||||
man = self._draw_man(misses, game_id)
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
import random # Used in movieFunc
|
||||
import datetime # Used in helloFunc
|
||||
import urllib # Used in imageFunc
|
||||
import random # Used in movie_func
|
||||
import datetime # Used in hello_func
|
||||
import urllib # Used in image_func
|
||||
import ast
|
||||
|
||||
import imdb # Used in movieFunc
|
||||
import discord # Used in movieFunc
|
||||
import lxml # Used in imageFunc
|
||||
import fandom # Used in findWikiPage
|
||||
import d20 # Used in rollDice
|
||||
import imdb # Used in movie_func
|
||||
import discord # Used in movie_func
|
||||
import lxml # Used in image_func
|
||||
import fandom # Used in find_wiki_page
|
||||
import d20 # Used in roll_dice
|
||||
|
||||
from .plex import Plex
|
||||
from .nerd_shit import NerdShit
|
||||
@ -93,7 +93,10 @@ class Other():
|
||||
cam = random.choice(cams)
|
||||
self.bot.log("Chose cam type "+cam)
|
||||
if cam == "one":
|
||||
search = f"img_{''.join([random.randint(0,9) for _ in range(4)])}"
|
||||
|
||||
search = "img_" + ''.join(
|
||||
[str(random.randint(0,9)) for _ in range(4)]
|
||||
)
|
||||
elif cam == "two":
|
||||
year = str(random.randint(2012,2016))
|
||||
month = str(random.randint(1,12)).zfill(2)
|
||||
@ -102,7 +105,9 @@ class Other():
|
||||
elif cam == "three":
|
||||
search = f"IMAG_{str(random.randint(1,500)).zfill(4)}"
|
||||
elif cam == "four":
|
||||
search = f"DSC_{''.join([random.randint(0,9) for _ in range(4)])}"
|
||||
search = "DSC_" + ''.join(
|
||||
[str(random.randint(0,9)) for _ in range(4)]
|
||||
)
|
||||
|
||||
self.bot.log("Searching for "+search)
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 697 KiB After Width: | Height: | Size: 638 KiB |
@ -1,37 +1,14 @@
|
||||
aiohttp==3.8.1
|
||||
async-timeout==4.0.2
|
||||
attrs==21.2.0
|
||||
beautifulsoup4==4.9.3
|
||||
cachetools==4.2.2
|
||||
certifi==2021.5.30
|
||||
chardet==4.0.0
|
||||
charset-normalizer==2.0.4
|
||||
d20==1.1.2
|
||||
discord.py==1.7.3
|
||||
discord-py-slash-command==3.0.1
|
||||
dnspython==1.16.0
|
||||
fandom-py==0.2.1
|
||||
finnhub-python==2.4.2
|
||||
gitdb==4.0.7
|
||||
GitPython==3.1.18
|
||||
greenlet==1.1.1
|
||||
idna==3.2
|
||||
discord_py_slash_command==3.0.3
|
||||
fandom_py==0.2.1
|
||||
finnhub_python==2.4.13
|
||||
GitPython==3.1.27
|
||||
IMDbPY==2021.4.18
|
||||
jaraco.context==4.0.0
|
||||
lark-parser==0.9.0
|
||||
lxml==4.7.1
|
||||
more-itertools==8.8.0
|
||||
multidict==5.1.0
|
||||
Pillow==9.0.0
|
||||
pymongo==3.12.0
|
||||
requests==2.26.0
|
||||
setuptools==57.4.0
|
||||
smmap==4.0.0
|
||||
soupsieve==2.2.1
|
||||
SQLAlchemy==1.4.22
|
||||
typing-extensions==3.10.0.0
|
||||
urllib3==1.26.6
|
||||
wheel==0.37.0
|
||||
lxml==4.8.0
|
||||
Pillow==9.1.0
|
||||
pymongo==4.1.1
|
||||
pymongo[srv]
|
||||
requests==2.27.1
|
||||
wolframalpha==5.0.0
|
||||
xmltodict==0.12.0
|
||||
yarl==1.6.3
|
||||
xmltodict==0.13.0
|
Reference in New Issue
Block a user