From 1049ee3e51ca4dcc3faa6ab02f378fadf5ec231f Mon Sep 17 00:00:00 2001 From: Suhail Date: Tue, 23 Apr 2019 18:28:04 +0100 Subject: Constants cleaning --- bot/seasons/christmas/adventofcode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bot/seasons/christmas/adventofcode.py') diff --git a/bot/seasons/christmas/adventofcode.py b/bot/seasons/christmas/adventofcode.py index 5d05dce6..32858673 100644 --- a/bot/seasons/christmas/adventofcode.py +++ b/bot/seasons/christmas/adventofcode.py @@ -13,7 +13,7 @@ from bs4 import BeautifulSoup from discord.ext import commands from pytz import timezone -from bot.constants import AdventOfCode as AocConfig, Colours, Emojis, Tokens +from bot.constants import AdventOfCode as AocConfig, Channels, Colours, Emojis, Tokens log = logging.getLogger(__name__) @@ -88,7 +88,7 @@ async def day_countdown(bot: commands.Bot): await asyncio.sleep(time_left.seconds) - channel = bot.get_channel(AocConfig.channel_id) + channel = bot.get_channel(Channels.seasonalbot_chat) if not channel: log.error("Could not find the AoC channel to send notification in") -- cgit v1.2.3 From bf1901eba73f7f7d3ea39cf3db6c1ecf5195e321 Mon Sep 17 00:00:00 2001 From: sco1 Date: Sat, 11 May 2019 21:24:26 -0400 Subject: Fix broken help getter patterns Utilize new ctx.send_help coro Bump d.py minor version & relock --- Pipfile | 2 +- Pipfile.lock | 6 +++--- bot/seasons/christmas/adventofcode.py | 2 +- bot/seasons/evergreen/snakes/snakes_cog.py | 9 +-------- bot/seasons/season.py | 2 +- bot/seasons/valentines/be_my_valentine.py | 2 +- 6 files changed, 8 insertions(+), 15 deletions(-) (limited to 'bot/seasons/christmas/adventofcode.py') diff --git a/Pipfile b/Pipfile index ef683ce4..85f8dc87 100644 --- a/Pipfile +++ b/Pipfile @@ -10,7 +10,7 @@ aiodns = "*" pillow = "*" pytz = "*" fuzzywuzzy = "*" -discord-py = "==1.1" +discord-py = "~=1.1" [dev-packages] "flake8" = "*" diff --git a/Pipfile.lock b/Pipfile.lock index b9018ed2..1cf9e44a 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "d6e5b54c2ad1f624aa119ba76fec878eeb7e0d10db6bc19e6a42f6b65f762638" + "sha256": "0e7e34beb8c746a91b7e2209586e5c93663bae113b2989af8a0df849cf0d7dc7" }, "pipfile-spec": 6, "requires": { @@ -124,10 +124,10 @@ }, "discord-py": { "hashes": [ - "sha256:da6f783d130ae4dff7cca59d9038460ac9fe964a56d1b96e6d4a4a6255b5bb00" + "sha256:d0ab22f1fee1fcc02ac50a67ff49a5d1f6d7bc7eba77e34e35bd160b3ad3d7e8" ], "index": "pypi", - "version": "==1.1" + "version": "==1.1.1" }, "fuzzywuzzy": { "hashes": [ diff --git a/bot/seasons/christmas/adventofcode.py b/bot/seasons/christmas/adventofcode.py index 5d05dce6..075c5606 100644 --- a/bot/seasons/christmas/adventofcode.py +++ b/bot/seasons/christmas/adventofcode.py @@ -132,7 +132,7 @@ class AdventOfCode(commands.Cog): async def adventofcode_group(self, ctx: commands.Context): """All of the Advent of Code commands.""" - await ctx.invoke(self.bot.get_command("help"), "adventofcode") + await ctx.send_help(ctx.command) @adventofcode_group.command( name="subscribe", diff --git a/bot/seasons/evergreen/snakes/snakes_cog.py b/bot/seasons/evergreen/snakes/snakes_cog.py index 3ffdf1bf..b5fb2881 100644 --- a/bot/seasons/evergreen/snakes/snakes_cog.py +++ b/bot/seasons/evergreen/snakes/snakes_cog.py @@ -458,7 +458,7 @@ class Snakes(Cog): async def snakes_group(self, ctx: Context): """Commands from our first code jam.""" - await ctx.invoke(self.bot.get_command("help"), "snake") + await ctx.send_help(ctx.command) @bot_has_permissions(manage_messages=True) @snakes_group.command(name='antidote') @@ -1055,13 +1055,6 @@ class Snakes(Cog): ) await ctx.channel.send(embed=embed) - @snakes_group.command(name='help') - async def help_command(self, ctx: Context): - """Invokes the help command for the Snakes Cog.""" - - log.debug(f"{ctx.author} requested info about the snakes cog") - return await ctx.invoke(self.bot.get_command("help"), "Snakes") - @snakes_group.command(name='snakify') async def snakify_command(self, ctx: Context, *, message: str = None): """ diff --git a/bot/seasons/season.py b/bot/seasons/season.py index 6d992276..6d99b77f 100644 --- a/bot/seasons/season.py +++ b/bot/seasons/season.py @@ -442,7 +442,7 @@ class SeasonManager(commands.Cog): async def refresh(self, ctx): """Refreshes certain seasonal elements without reloading seasons.""" if not ctx.invoked_subcommand: - await ctx.invoke(bot.get_command("help"), "refresh") + await ctx.send_help(ctx.command) @refresh.command(name="avatar") async def refresh_avatar(self, ctx): diff --git a/bot/seasons/valentines/be_my_valentine.py b/bot/seasons/valentines/be_my_valentine.py index 55c4adb1..5ff5857b 100644 --- a/bot/seasons/valentines/be_my_valentine.py +++ b/bot/seasons/valentines/be_my_valentine.py @@ -42,7 +42,7 @@ class BeMyValentine(commands.Cog): 2) use the command \".lovefest unsub\" to get rid of the lovefest role. """ - await ctx.invoke(self.bot.get_command("help"), "lovefest") + await ctx.send_help(ctx.command) @lovefest_role.command(name="sub") async def add_role(self, ctx): -- cgit v1.2.3