Added skip command for JawaFM
parent
1c13db09c1
commit
5095a254aa
|
@ -21,4 +21,5 @@
|
|||
**!conch** or **!magicconch**: Same as the 8ball command but waaaaay cooler! :shell:
|
||||
**!giveaway prize**: Do a giveaway based on users reacting with the emoji you react with secretly. Use in private and replace prize with an actual prize!
|
||||
**!np**: Posts currently playing info for ToukuFM.
|
||||
**!roll**: Rolls any number of dice! Use like `!roll d20`, `!roll 2d6`, or `!roll 3d6 d20`
|
||||
**!roll**: Rolls any number of dice! Use like `!roll d20`, `!roll 2d6`, or `!roll 3d6 d20`
|
||||
**!fmskip station**: Tells LiquidSoap to skip the currently playing track on **station** on JawaFM.
|
13
pocketbot.py
13
pocketbot.py
|
@ -10,6 +10,7 @@ import os
|
|||
import requests
|
||||
import json
|
||||
import re
|
||||
import telnetlib
|
||||
|
||||
#Get script location
|
||||
cwd = os.path.dirname(os.path.realpath(__file__))
|
||||
|
@ -331,6 +332,18 @@ def on_message(message):
|
|||
#Send output to chat
|
||||
yield from client.send_message(message.channel, output)
|
||||
|
||||
#Skip tracks/mixes on JawaFM
|
||||
elif message.content.lower().startswith('!fmskip'):
|
||||
args = message.content.partition(' ')[2]
|
||||
station = args.partition(' ')[0]
|
||||
if (station is ''):
|
||||
yield from client.send_message(message.channel, 'Please provide a station to skip.')
|
||||
else:
|
||||
skipcommand = station + '(dot)ogg.skip\n'
|
||||
tn = telnetlib.Telnet("localhost", 1234)
|
||||
tn.write(skipcommand.encode('ascii'))
|
||||
tn.close()
|
||||
|
||||
|
||||
|
||||
client.loop.create_task(ups_check())
|
||||
|
|
Loading…
Reference in New Issue