From 225178f695a8b3f93fedb7bf27d27245e4aa491e Mon Sep 17 00:00:00 2001 From: ColaIan Date: Thu, 20 Feb 2020 13:30:18 +0800 Subject: [PATCH 1/3] Ignore punctuations from SAO easter egg Signed-off-by: ColaIan --- teapot/events.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/teapot/events.py b/teapot/events.py index 24d98ae..ad3ec92 100644 --- a/teapot/events.py +++ b/teapot/events.py @@ -81,8 +81,15 @@ async def on_message(message): @bot.event async def on_message(message): # SAO Easter Egg - if message.content.lower().startswith("system call "): - content = message.content[12:].split(" ") + punctuations = '!()-[]{};:\'"\\,<>./?@#$%^&*_~' + # remove punctuation from the string + msg = "" + for char in message.content.lower(): + if char not in punctuations: + msg = msg + char + + if msg.startswith("system call "): + content = msg[12:].split(" ") if content[0].lower() == "inspect": if content[1].lower() == "entire": if content[2].lower() == "command": From cfc2e408c31b80af4cfbe097bc1287226fbfd333 Mon Sep 17 00:00:00 2001 From: ColaIan Date: Tue, 3 Mar 2020 09:59:19 +0800 Subject: [PATCH 2/3] Allowed % to work in volume command. Signed-off-by: ColaIan --- teapot/cogs/music.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/teapot/cogs/music.py b/teapot/cogs/music.py index 617d46e..54f4ca6 100644 --- a/teapot/cogs/music.py +++ b/teapot/cogs/music.py @@ -175,10 +175,15 @@ async def pause(self, ctx): await ctx.send('⏯ | Paused') @commands.command(aliases=['vol']) - async def volume(self, ctx, volume: int = None): + async def volume(self, ctx, volume): """ Changes the player's volume (0-1000). """ player = self.bot.lavalink.players.get(ctx.guild.id) + try: + volume = int(volume) + except: + volume = int(volume[:-1]) + if not volume: return await ctx.send(f'🔈 | {player.volume}%') From be0b688a7748e289ac030b104e031cfaafbcc40c Mon Sep 17 00:00:00 2001 From: RedTea Date: Sat, 28 Mar 2020 00:26:18 +0800 Subject: [PATCH 3/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c0ce7bd..a29998f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![banner](https://user-images.githubusercontent.com/43201383/72987537-89830a80-3e25-11ea-95ef-ecfa0afcff7e.png)

- GitHub License + GitHub License GitHub Issues GitHub Pull Requests GitHub Stars @@ -56,4 +56,4 @@ These are the requirements for the bot, and they will be bundled in future relea ## 💛 Credits The projects listed in below have provided inspiration, and we thought we'd mention them: -- LavaLink: https://github.com/Frederikam/Lavalink \ No newline at end of file +- LavaLink: https://github.com/Frederikam/Lavalink