mirror of
https://xfnw.ttm.sh/git/oirc.git
synced 2024-06-20 23:57:04 +00:00
only respond to upnext and nowplaying when tildebot not present
This commit is contained in:
parent
295e760cb7
commit
ca0d600a9d
|
@ -119,6 +119,8 @@ def formatSec(dt):
|
||||||
|
|
||||||
|
|
||||||
async def upnext(self,c,n,m):
|
async def upnext(self,c,n,m):
|
||||||
|
if 'tildebot' in self.channels[c]['users']:
|
||||||
|
return # only respond in #tr whilst tildebot is down
|
||||||
res = requests.get('https://radio.tildeverse.org/api/station/1/schedule')
|
res = requests.get('https://radio.tildeverse.org/api/station/1/schedule')
|
||||||
if res.status_code == 200:
|
if res.status_code == 200:
|
||||||
js = res.json()
|
js = res.json()
|
||||||
|
@ -131,6 +133,8 @@ async def upnext(self,c,n,m):
|
||||||
await self.message(c,'[\x036radio\x0f] something went wrong...')
|
await self.message(c,'[\x036radio\x0f] something went wrong...')
|
||||||
|
|
||||||
async def nowplaying(self,c,n,m):
|
async def nowplaying(self,c,n,m):
|
||||||
|
if 'tildebot' in self.channels[c]['users']:
|
||||||
|
return # only respond in #tr whilst tildebot is down
|
||||||
res = requests.get("https://radio.tildeverse.org/api/nowplaying/1")
|
res = requests.get("https://radio.tildeverse.org/api/nowplaying/1")
|
||||||
if res.status_code == 200:
|
if res.status_code == 200:
|
||||||
js = res.json()
|
js = res.json()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user