Coder Social home page Coder Social logo

gs-broadcast-bot's Introduction

The code found here was originally created by grooveshark.com/uman42 It has been heavily modified and improved for WritheM Radio by grooveshark.com/xandor and grooveshark.com/pironic

this is currently just a placeholder for a proper readme which will come in time.

simply put, the js folder is what is loaded as a chrome extention. the php folder is what is loaded onto a webserver somewhere accessible to the chrome browser. ideally internal only.

config.php in php needs a wolfram alpha api key.

access the settings for the js via the extensions / options menu.

to start a broadcast go to http://broadcast/ and let the bot do its thing.

gs-broadcast-bot's People

Contributors

gsclassics avatar pironic avatar reanmachine avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gs-broadcast-bot's Issues

/fetchLast x

should fetch the last x songs... not always just 1

Flood protection for /wa commands

Some people really abuse the shit out of /wa, it'd be nice to give them something like 5 commands per 15 minutes or something configurable simply to cut down on the /wa spam.

/setParam <paramater> <value>

easy to implement, should save the GUParam after being issued. allows you to set variables... if no value is passed, maybe it just returns the current value?

callout rotation functionality.

this would allow you define a playlist that contains callouts used on your broadcast. every x song it would play a random entry from that playlist.

/clearSuggestions function

it would approve everything in the suggestions, then remove from the end of queue.

var suggestions = GS.getCurrentBroadcast().attributes.suggestions.models;
var number = suggestions.length;
suggestions.forEach(function(suggestion) {
    GS.Services.SWF.approveSuggestedSongForBroadcast(suggestion.attributes.SongID)
});
var songs = GS.Services.SWF.getCurrentQueue().songs;
if (isNaN(number) || number < 1)
    number = 0;
while (--number >= 0)
{
    if (songs.length - 1 - number >= 0)
    {
        var id = songs[songs.length - 1 - number].queueSongID;
        if (id != GS.Services.SWF.getCurrentQueue().activeSong.queueSongID)
            allID.push(id);
    }
}
if (allID.length > 0)
{
    GS.Services.SWF.removeSongs(allID);
}

/poll <question> <answers>

somehow code a /poll to run until /poll is called again.

maybe separate the quesiton from answers with a | and a ?

output the last contest winner again... just in case

If the bot talks too much then it gets flood blocked. If the contest winner announcement gets blocked... revolt.

If we log the message to console, then the admin could theoretically find it again.
or
If no contest was running, we could say the winner of the last contest when an admin typed /ballot.

โ‚ฉ aka WMDollars

Lets give everyone a ballance of WritheM Dollars. They can use them to trade and credit other people. They earn them by voting on the current songs playing. They can't spend them. Similar to Reddit Karma.

RSS commands.

could run on a series of timers that polls for changes and outputs the value of the rss if a new entry is detected.

/addRSS <link> <interval in min>
/listRSS
/delRSS <number provided by listRSS>

Konami Code

It would be cool if the bot had a hidden Konami Code function.

Not sure what it would do though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.