Renamed ?cond to ?solar

- Deprecated old name and aliases.

Fixes #324
This commit is contained in:
0x5c 2021-01-17 23:55:23 -05:00
parent 32c7029b88
commit 6092252eaa
No known key found for this signature in database
GPG Key ID: A57F71C3176B9581
2 changed files with 10 additions and 4 deletions

View File

@ -11,8 +11,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- New colour theme for `?greyline`.
- Moved great circle distance and bearing calculation from `?ungrid` to `?griddistance`.
- `?ungrid` to `?latlong`.
- Renamed `?cond` to `?solar`.
### Deprecated
- `?ungrid`.
- Deprecated old `?solar` aliases (`?cond`, etc).
## [2.5.1] - 2020-12-10

View File

@ -24,11 +24,15 @@ class WeatherCog(commands.Cog):
self.bot = bot
self.session = aiohttp.ClientSession(connector=bot.qrm.connector)
@commands.command(name="bandconditions", aliases=["cond", "condx", "conditions"], category=cmn.cat.weather)
async def _band_conditions(self, ctx: commands.Context):
"""Gets a solar conditions report."""
@commands.command(aliases=["solar", "bandconditions", "cond", "condx", "conditions"], category=cmn.cat.weather)
async def solarweather(self, ctx: commands.Context):
"""Gets a solar weather report."""
embed = cmn.embed_factory(ctx)
embed.title = "Current Solar Conditions"
embed.title = "☀️ Current Solar Weather"
if ctx.invoked_with in ["bandconditions", "cond", "condx", "conditions"]:
embed.add_field(name="⚠️ Deprecated Command Alias",
value=(f"This command has been renamed to `{ctx.prefix}solar`!\n"
"The alias you used will be removed in the next version."))
embed.colour = cmn.colours.good
embed.set_image(url="http://www.hamqsl.com/solarsun.php")
await ctx.send(embed=embed)