forked from tilderadio/radiobot
update readme and add webhook php script
This commit is contained in:
parent
5c2a2fca14
commit
e2568c70da
|
@ -5,3 +5,6 @@ super simple bot
|
||||||
it:
|
it:
|
||||||
* responds to pings
|
* responds to pings
|
||||||
* sends a message to #tilderadio when `$now_playing_file` changes
|
* sends a message to #tilderadio when `$now_playing_file` changes
|
||||||
|
|
||||||
|
drop webhook.php somewhere in a webroot and update `now_playing_file` in bot.properties to point to now_playing.txt in that dir.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
// this makes a lot of assumptions but it works with azuracast webhooks
|
||||||
|
file_put_contents(
|
||||||
|
"now_playing.txt",
|
||||||
|
json_decode(file_get_contents('php://input'))->now_playing->song->text
|
||||||
|
);
|
Loading…
Reference in New Issue