Giter VIP home page Giter VIP logo

dopebot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dopebot's Issues

Improve Documentation

There's really not enough information about what is required to get this running, in terms of setting up in Slack. Even if this is based on another bot (hubot?) it would be helpful to mention that in order to reference other documentation

I get missing scope errors, but I don't know what scope is required. A few lines on the general setup in Slack would go a long way to making this easier. I'll try to write up what I find as I go.

Also, for example, error messages could be more helpful by mentioning what authentication error is generated, ie "Something went wrong when retrieving an access token" would be helpful if it was prefixed with Spotify/Slack.

Idea: Workflow for searching and playing items from Spotify

Basic search and returns numbered results for later reference:

  • search <keyword> returns hits from album, artist, track, playlists
  • search playlist <keyword> only returns hits from playlists
  • search <type> <keyword> where type is album, artist, playlist, track

For "generic" searches, the "top 10" search results are displayed grouped by type to fill up 10 hits, something like:

1. Artist: xyz
2. Artist: xyz #2
3. Album: xyz from artist-name
4. Album: xyz #2 from artist-name
5. Playlist: xyz Playlist 1 from User xy
6. Playlist: xyz Playlist 2 from User zz
7. Track: yzs from artist-name (Album: xxx)
8. Track: yzs from artist-name (Album: xxx)
9. Track: yzs from artist-name (Album: xxx)
10. Track: yzs from artist-name (Album: xxx)

Challenge is how to group the different kind of items in this list, and how many of which to display. The spotify client does a pretty good job here.

Then I move over to playing one of the hits:

  • play 5 would then start playing the playlist "xyz Playlist 1 from User xy"
  • play 1 would play the "top 10" songs from artist xyz
  • play 3 would play the album from 1-end

The same could be used to fill up the "playlist":

  • queue 5
  • queue 1
  • etc

Then some commands to be able to see the currently played song + the next 10 songs in the queue:

  • queue show

.... more to come

`play` doesn't clear playlist first

The difference between play and queue should be that play starts the selected item directly (erasing the current list of tracks) and queue should just add it for later playing. It seems that currently the play also only enqueues, which always require a clean before. So the play functionality should be fixed or changed.

Search results numbered throughout types

Currently you search and get hits "0-4" in every type. This requires then to specify the type when wanting to play something. Better would be to number them throughout types and then "play 7" would play that item, regardless of the type:

Tracks:
1. 
2. 
3.
4. 
Albums:
5.
6.
7.
Playlists:
8.
9.
10.

This seems to be the most common mistake (people typing play 0) and would be mitigated by this change.

search command no longer works

Whenever I do a search stuff command on the slack channel this is printed in console:

2017-11-07T06:07:46.2222 - error: Something went wrong when retrieving an access token
{ [WebapiError: Bad Request] name: 'WebapiError', message: 'Bad Request', statusCode: 400 }

The bot works fine with play <spotifyuri> and everything else. It just can't search.

More infos in "status" output

While playing a playlist, status only says "playing". Cool would be to get more infos and maybe add the current and vol information to it so that this is the one command to see everything about what's going on (less spams in the channel):

The queue still has NN songs - hh:mm to go
Currently playing Deep Sphere (Stephan Koenigk Remix) by Michael Schwarz from Deep Sphere EP
Volume: 100

So 1. the state of the queue, 2. the current state + song, 3. the current volume

For 1. the state of the queue, alternatives output in other situations could be:

This is the last song in the queue

The queue is empty

For 2. the current state, alternatives:

Currently paused

Currently stopped

Show originating playlist while playing individual songs

If one starts playing songs from a playlist, it could be interesting to display that information along the individual songs that are actually being played.

Current output:

Playing with volume 35
The Trooper - 1998 Remastered Version from Piece Of Mind (1998 Remastered Edition) added by ernesto
Iron Maiden

in pseudo-code:

<songname> from <album> added by <person>
<artist>

Desired would be:

<songname> from <album>
<artist>
added by <person> from playlist <playlist>

Better "tracks" listing (Limit to the next 10 and show time to play)

Some cosmetics in the current track list (tracks):

  • to avoid spamming the channel with too much noise (some playlists have 1000's songs), limit the output of tracks to the next 10. If there are more than 10 tracks in the queue, finalize with:

... and YY more tracks

  • prefix the tracks with a number to make the list more readable.
  1. Track 1 by XY from xxxx
  2. Track 2 by ZZ from nnnn
  3. Track 3 by jj from mmm
  • if possible, show the amount of time of music that is enqueued at the end:

Total time of music in queue: hh:mm

Make the bot more error prone: aliases

Despite us all being programmers, we still want to communicate as easy as possible with the bot. Common mistakes should be tollerated and "understood" by the bot. With that I mean some aliases allowed for common commands:

  • skip, next
  • clear, clean
  • tracks, list
  • vol, volume and also things like vol up (+5 steps from current) and vol down (-5 steps)

Cosmetics in "search" output

Some improvements in the search output:

  • Too many hits! I would only show "maximum 16" and not 10 per category. So if there are enough hits, show 4 artists, 4 albums, 4 playlists, 4 tracks. If one needs more hits in a certain category, search specifically. If there are less hits in one category, fill up "tracks" categories (fallback to playlists, albums) instead. I.e. if there are only 2 artists: show 2 artists, 4 albums, 4 playlists, 6 tracks. etc.
  • Albums hits: Also show artist (and maybe release year?):

Master of Puppets from Metallica (1986)

  • Tracks hits: Use same output as in the tracks list. Maybe add the album in which the track is in, if the information is available without further queries?
  • Playlist hits: Also show creator and maybe amount of followers

Metallica Greatest Hits from hif.pettersson (8.576 followers)

Starting a playlist from "search" does not work

Doing a search and selecting a playlist by number tries to start it like:

Adding spotify:playlist:37i9dQZF1DWSNC7AjZWNry to tracklist

This does not work. The username is missing. Either handle that case without username or add the username. This works then:

play spotify:user:spotify:playlist:37i9dQZF1DWSNC7AjZWNry

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.