Cleaned up UWUify command & Updated Changelog

This commit is contained in:
licyb200 2022-03-01 20:31:41 -08:00
parent 1dc55eaff2
commit 2453d20757
2 changed files with 8 additions and 15 deletions

View File

@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased] ## [Unreleased]
## [2.7.5] - 2022-03-01
### Added
- UwUify command
## [2.7.4] - 2021-10-07 ## [2.7.4] - 2021-10-07
### Added ### Added

View File

@ -71,22 +71,12 @@ class FunCog(commands.Cog):
@commands.command(name="uwuify", aliases=["uwu"], category=cmn.Cats.FUN) @commands.command(name="uwuify", aliases=["uwu"], category=cmn.Cats.FUN)
async def _uwuify(self, ctx: commands.Context, *, msg: str): async def _uwuify(self, ctx: commands.Context, *, msg: str):
uwuified_text = '' uwuified_text = msg
for i, c in enumerate(msg): uwuified_text = uwuified_text.replace('na', 'nya')
previous_char = msg[i - 1] if i > 0 else '' uwuified_text = uwuified_text.translate({108: 119, 114: 119, 76: 87, 82: 87})
if c == 'L' or c == 'R': uwuified_text = uwuified_text.replace('no', 'yo').replace('mo', 'yo')
uwuified_text += 'W'
elif c == 'l' or c == 'r':
uwuified_text += 'w'
elif c == 'O' or c == 'o':
if previous_char == 'N' or previous_char == 'n' or previous_char == 'M' or previous_char == 'm':
uwuified_text += "yo"
else:
uwuified_text += c
else:
uwuified_text += c
await ctx.send(uwuified_text) await ctx.send(uwuified_text)
def setup(bot: commands.Bot): def setup(bot: commands.Bot):
bot.add_cog(FunCog(bot)) bot.add_cog(FunCog(bot))