Skip to content

Commit

Permalink
[Runescape] Update wilderness command slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
TrustyJAID committed Aug 22, 2024
1 parent c9235b1 commit 6b50c5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions runescape/runescape.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ async def reset(self, ctx: commands.Context) -> None:
async def wilderness(self, ctx: commands.Context) -> None:
"""Show Runescapes Daily, Weekly, and Monthly reset times."""
async with ctx.typing():
use_links = await ctx.embed_requested()
msg = "## Wilderness Flash Event Schedule\n"
max_spaces = 26
today = datetime.now(timezone.utc).replace(minute=0, second=0, microsecond=0)
Expand All @@ -454,15 +453,11 @@ async def wilderness(self, ctx: commands.Context) -> None:
)
ts = discord.utils.format_dt(event.get_next(today), "R")
special_header = "### " if event.special else ""
if use_links:
msg += f"{special_header}- `{event_name.ljust(max_spaces)}` - {ts} [link]({url})\n"
else:
msg += f"{special_header}- `{event_name.ljust(max_spaces)}` - {ts}\n"
msg += f"{special_header}- `{event_name.ljust(max_spaces)}` - {ts} [link]({url})\n"
wild_rewards_url = "https://runescape.wiki/w/Sack_of_very_wild_rewards"
if use_links:
msg += f"*Special events have a chance to drop a [sack of very wild rewards]({wild_rewards_url})."
else:
msg += f"*Special events have a chance to drop a sack of very wild rewards.\n{wild_rewards_url}"
msg += (
f"-# *Special events can drop a [sack of very wild rewards]({wild_rewards_url})."
)
await ctx.maybe_send_embed(msg)

######################################################################################
Expand Down
2 changes: 1 addition & 1 deletion runescape/wilderness.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class WildernessFlashEvents(Enum):
evil_bloodwood_tree = 13

def __str__(self):
return self.name.replace("_", " ").title()
return self.name.replace("_", " ").title().replace("The", "the")

def __len__(self):
return len(WildernessFlashEvents)
Expand Down

0 comments on commit 6b50c5f

Please sign in to comment.