Skip to content

Commit 6b6babc

Browse files
authored
Merge pull request #4 from RedCokeDevelopment/v.0.0.1.6
V.0.0.1.6 Update
2 parents 6e611fd + be0b688 commit 6b6babc

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![banner](https://user-images.githubusercontent.com/43201383/72987537-89830a80-3e25-11ea-95ef-ecfa0afcff7e.png)
22

33
<p align="center">
4-
<a href="https://github.com/RedCokeDevelopment/Teapot.py/blob/dev/LICENSE"><img src="https://img.shields.io/github/license/redcokedevelopment/teapot.py.svg?style=flat-square" alt="GitHub License"></a>
4+
<a href="https://github.com/RedCokeDevelopment/Teapot.py/blob/master/LICENSE"><img src="https://img.shields.io/github/license/redcokedevelopment/teapot.py.svg?style=flat-square" alt="GitHub License"></a>
55
<a href="https://github.com/RedCokeDevelopment/Teapot.py/issues"><img src="https://img.shields.io/github/issues/redcokedevelopment/teapot.py.svg?color=purple&style=flat-square" alt="GitHub Issues"></a>
66
<a href="https://github.com/RedCokeDevelopment/Teapot.py/pulls"><img src="https://img.shields.io/github/issues-pr/redcokedevelopment/teapot.py.svg?color=purple&style=flat-square" alt="GitHub Pull Requests"></a>
77
<a href="https://github.com/RedCokeDevelopment/Teapot.py/stargazers"><img src="https://img.shields.io/github/stars/redcokedevelopment/teapot.py.svg?style=flat-square" alt="GitHub Stars"></a>
@@ -56,4 +56,4 @@ These are the requirements for the bot, and they will be bundled in future relea
5656
## 💛 Credits
5757
The projects listed in below have provided inspiration, and we thought we'd mention them:
5858

59-
- LavaLink: https://github.com/Frederikam/Lavalink
59+
- LavaLink: https://github.com/Frederikam/Lavalink

teapot/cogs/music.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,15 @@ async def pause(self, ctx):
175175
await ctx.send('⏯ | Paused')
176176

177177
@commands.command(aliases=['vol'])
178-
async def volume(self, ctx, volume: int = None):
178+
async def volume(self, ctx, volume):
179179
""" Changes the player's volume (0-1000). """
180180
player = self.bot.lavalink.players.get(ctx.guild.id)
181181

182+
try:
183+
volume = int(volume)
184+
except:
185+
volume = int(volume[:-1])
186+
182187
if not volume:
183188
return await ctx.send(f'🔈 | {player.volume}%')
184189

teapot/events.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,15 @@ async def on_message(message):
8181
@bot.event
8282
async def on_message(message):
8383
# SAO Easter Egg
84-
if message.content.lower().startswith("system call "):
85-
content = message.content[12:].split(" ")
84+
punctuations = '!()-[]{};:\'"\\,<>./?@#$%^&*_~'
85+
# remove punctuation from the string
86+
msg = ""
87+
for char in message.content.lower():
88+
if char not in punctuations:
89+
msg = msg + char
90+
91+
if msg.startswith("system call "):
92+
content = msg[12:].split(" ")
8693
if content[0].lower() == "inspect":
8794
if content[1].lower() == "entire":
8895
if content[2].lower() == "command":

0 commit comments

Comments
 (0)