Skip to content

Commit

Permalink
Removed all references to !subscribe (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
brodycritchlow authored Nov 28, 2023
1 parent f916a3f commit 80a78d1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 26 deletions.
1 change: 1 addition & 0 deletions bot/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class _Channels(EnvConfig, env_prefix="CHANNEL_"):
off_topic_2: int = 463035268514185226
voice_chat_0: int = 412357430186344448
voice_chat_1: int = 799647045886541885
roles: int = 851270062434156586


Channels = _Channels()
Expand Down
16 changes: 0 additions & 16 deletions bot/exts/advent_of_code/_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from bot.exts.advent_of_code.views.dayandstarview import AoCDropdownView
from bot.utils import members
from bot.utils.decorators import InChannelCheckFailure, in_month, whitelist_override, with_role
from bot.utils.exceptions import MovedCommandError

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -149,21 +148,6 @@ async def block_from_role(self, ctx: commands.Context, member: discord.Member) -
await self.completionist_block_list.set(member.id, "sentinel")
await ctx.send(f":+1: Blocked {member.mention} from getting the AoC completionist role.")

@commands.guild_only()
@adventofcode_group.command(
name="subscribe",
aliases=("sub", "notifications", "notify", "notifs", "unsubscribe", "unsub"),
help=f"NOTE: This command has been moved to {Bot.prefix}subscribe",
)
@whitelist_override(channels=AOC_WHITELIST)
async def aoc_subscribe(self, ctx: commands.Context) -> None:
"""
Deprecated role command.
This command has been moved to bot, and will be removed in the future.
"""
raise MovedCommandError(f"{Bot.prefix}subscribe")

@adventofcode_group.command(name="countdown", aliases=("count", "c"), brief="Return time left until next day")
@whitelist_override(channels=AOC_WHITELIST)
async def aoc_countdown(self, ctx: commands.Context) -> None:
Expand Down
4 changes: 2 additions & 2 deletions bot/exts/summer_aoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

NEXT_PUZZLE_TEXT = """
The next puzzle will be posted <t:{timestamp}:R>.
To receive notifications when new puzzles are released, run `!subscribe` in <#{bot_commands}> and assign yourself \
To recieve notifications when new puzzles are released, head over to <#{roles}> and assign yourself \
the Revival of Code role.
"""

Expand Down Expand Up @@ -330,7 +330,7 @@ def get_puzzle_embed(self) -> discord.Embed:
else:
next_puzzle_text = NEXT_PUZZLE_TEXT.format(
timestamp=int(self.next_post_time().timestamp()),
bot_commands=Channels.bot_commands,
roles=Channels.roles
)
post_text = POST_TEXT.format(
public_name=PUBLIC_NAME,
Expand Down
8 changes: 0 additions & 8 deletions bot/utils/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,3 @@ class JamCategoryNameConflictError(Exception):

class CodeJamCategoryCheckFailure(CheckFailure):
"""Raised when the specified command was run outside the Code Jam categories."""



class MovedCommandError(Exception):
"""Raised when a command has moved locations."""

def __init__(self, new_command_name: str):
self.new_command_name = new_command_name

0 comments on commit 80a78d1

Please sign in to comment.