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 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}%') 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":