autoplay is canceled on !m s, fixed music commandlist

This commit is contained in:
Master Kwoth 2016-07-04 20:16:12 +02:00
parent d264000ea7
commit b83e1d74f8
4 changed files with 38 additions and 35 deletions

View File

@ -79,7 +79,7 @@ namespace NadekoBot.Modules.Administration
}); });
cgb.CreateCommand(Prefix + "restart") cgb.CreateCommand(Prefix + "restart")
.Description("Restarts the bot. Might not work.") .Description("Restarts the bot. Might not work. **Bot Owner Only**")
.AddCheck(SimpleCheckers.OwnerOnly()) .AddCheck(SimpleCheckers.OwnerOnly())
.Do(async e => .Do(async e =>
{ {

View File

@ -50,7 +50,7 @@ namespace NadekoBot.Modules.Music.Classes
private bool Destroyed { get; set; } = false; private bool Destroyed { get; set; } = false;
public bool RepeatSong { get; private set; } = false; public bool RepeatSong { get; private set; } = false;
public bool RepeatPlaylist { get; private set; } = false; public bool RepeatPlaylist { get; private set; } = false;
public bool Autoplay { get; private set; } = false; public bool Autoplay { get; set; } = false;
public MusicPlayer(Channel startingVoiceChannel, float? defaultVolume) public MusicPlayer(Channel startingVoiceChannel, float? defaultVolume)
{ {

View File

@ -58,7 +58,10 @@ namespace NadekoBot.Modules.Music
MusicPlayer musicPlayer; MusicPlayer musicPlayer;
if (!MusicPlayers.TryGetValue(e.Server, out musicPlayer)) return; if (!MusicPlayers.TryGetValue(e.Server, out musicPlayer)) return;
if (e.User.VoiceChannel == musicPlayer.PlaybackVoiceChannel) if (e.User.VoiceChannel == musicPlayer.PlaybackVoiceChannel)
{
musicPlayer.Autoplay = false;
musicPlayer.Stop(); musicPlayer.Stop();
}
}); });
cgb.CreateCommand("destroy") cgb.CreateCommand("destroy")

View File

@ -2,7 +2,7 @@
######You can donate on paypal: `nadekodiscordbot@gmail.com` or Bitcoin `17MZz1JAqME39akMLrVT4XBPffQJ2n1EPa` ######You can donate on paypal: `nadekodiscordbot@gmail.com` or Bitcoin `17MZz1JAqME39akMLrVT4XBPffQJ2n1EPa`
#NadekoBot List Of Commands #NadekoBot List Of Commands
Version: `NadekoBot v0.9.6029.16666` Version: `NadekoBot v0.9.6029.36463`
### Help ### Help
Command and aliases | Description | Usage Command and aliases | Description | Usage
----------------|--------------|------- ----------------|--------------|-------
@ -54,7 +54,7 @@ Command and aliases | Description | Usage
`.listincidents`, `.lin` | List all UNREAD incidents and flags them as read. `.listincidents`, `.lin` | List all UNREAD incidents and flags them as read.
`.listallincidents`, `.lain` | Sends you a file containing all incidents and flags them as read. `.listallincidents`, `.lain` | Sends you a file containing all incidents and flags them as read.
`.delmsgoncmd` | Toggles the automatic deletion of user's successful command message to prevent chat flood. Server Manager Only. `.delmsgoncmd` | Toggles the automatic deletion of user's successful command message to prevent chat flood. Server Manager Only.
`.restart` | Restarts the bot. Might not work. `.restart` | Restarts the bot. Might not work. **Bot Owner Only**
`.setrole`, `.sr` | Sets a role for a given user. | .sr @User Guest `.setrole`, `.sr` | Sets a role for a given user. | .sr @User Guest
`.removerole`, `.rr` | Removes a role from a given user. | .rr @User Admin `.removerole`, `.rr` | Removes a role from a given user. | .rr @User Admin
`.renamerole`, `.renr` | Renames a role. Role you are renaming must be lower than bot's highest role. | `.renr "First role" SecondRole` `.renamerole`, `.renr` | Renames a role. Role you are renaming must be lower than bot's highest role. | `.renr "First role" SecondRole`
@ -200,37 +200,37 @@ Command and aliases | Description | Usage
### Music ### Music
Command and aliases | Description | Usage Command and aliases | Description | Usage
----------------|--------------|------- ----------------|--------------|-------
`! next`, `! n`, `! skip` | Goes to the next song in the queue. You have to be in the same voice channel as the bot. | `!m n` `!m next`, `!m n`, `!m skip` | Goes to the next song in the queue. You have to be in the same voice channel as the bot. | `!m n`
`! stop`, `! s` | Stops the music and clears the playlist. Stays in the channel. | `!m s` `!m stop`, `!m s` | Stops the music and clears the playlist. Stays in the channel. | `!m s`
`! destroy`, `! d` | Completely stops the music and unbinds the bot from the channel. (may cause weird behaviour) | `!m d` `!m destroy`, `!m d` | Completely stops the music and unbinds the bot from the channel. (may cause weird behaviour) | `!m d`
`! pause`, `! p` | Pauses or Unpauses the song. | `!m p` `!m pause`, `!m p` | Pauses or Unpauses the song. | `!m p`
`! queue`, `! q`, `! yq` | Queue a song using keywords or a link. Bot will join your voice channel.**You must be in a voice channel**. | `!m q Dream Of Venice` `!m queue`, `!m q`, `!m yq` | Queue a song using keywords or a link. Bot will join your voice channel.**You must be in a voice channel**. | `!m q Dream Of Venice`
`! listqueue`, `! lq` | Lists 15 currently queued songs per page. Default page is 1. | `!m lq` or `!m lq 2` `!m listqueue`, `!m lq` | Lists 15 currently queued songs per page. Default page is 1. | `!m lq` or `!m lq 2`
`! nowplaying`, `! np` | Shows the song currently playing. | `!m np` `!m nowplaying`, `!m np` | Shows the song currently playing. | `!m np`
`! volume`, `! vol` | Sets the music volume 0-100% | `!m vol 50` `!m volume`, `!m vol` | Sets the music volume 0-100% | `!m vol 50`
`! defvol`, `! dv` | Sets the default music volume when music playback is started (0-100). Does not persist through restarts. | `!m dv 80` `!m defvol`, `!m dv` | Sets the default music volume when music playback is started (0-100). Does not persist through restarts. | `!m dv 80`
`! mute`, `! min` | Sets the music volume to 0% | `!m min` `!m mute`, `!m min` | Sets the music volume to 0% | `!m min`
`! max` | Sets the music volume to 100% (real max is actually 150%). | `!m max` `!m max` | Sets the music volume to 100% (real max is actually 150%). | `!m max`
`! half` | Sets the music volume to 50%. | `!m half` `!m half` | Sets the music volume to 50%. | `!m half`
`! shuffle`, `! sh` | Shuffles the current playlist. | `!m sh` `!m shuffle`, `!m sh` | Shuffles the current playlist. | `!m sh`
`! playlist`, `! pl` | Queues up to 50 songs from a youtube playlist specified by a link, or keywords. | `!m pl playlist link or name` `!m playlist`, `!m pl` | Queues up to 50 songs from a youtube playlist specified by a link, or keywords. | `!m pl playlist link or name`
`! soundcloudpl`, `! scpl` | Queue a soundcloud playlist using a link. | `!m scpl https://soundcloud.com/saratology/sets/symphony` `!m soundcloudpl`, `!m scpl` | Queue a soundcloud playlist using a link. | `!m scpl https://soundcloud.com/saratology/sets/symphony`
`! localplaylst`, `! lopl` | Queues all songs from a directory. **Bot Owner Only!** | `!m lopl C:/music/classical` `!m localplaylst`, `!m lopl` | Queues all songs from a directory. **Bot Owner Only!** | `!m lopl C:/music/classical`
`! radio`, `! ra` | Queues a radio stream from a link. It can be a direct mp3 radio stream, .m3u, .pls .asx or .xspf | `!m ra radio link here` `!m radio`, `!m ra` | Queues a radio stream from a link. It can be a direct mp3 radio stream, .m3u, .pls .asx or .xspf | `!m ra radio link here`
`! local`, `! lo` | Queues a local file by specifying a full path. **Bot Owner Only!** | `!m lo C:/music/mysong.mp3` `!m local`, `!m lo` | Queues a local file by specifying a full path. **Bot Owner Only!** | `!m lo C:/music/mysong.mp3`
`! move`, `! mv` | Moves the bot to your voice channel. (works only if music is already playing) | `!m mv` `!m move`, `!m mv` | Moves the bot to your voice channel. (works only if music is already playing) | `!m mv`
`! remove`, `! rm` | Remove a song by its # in the queue, or 'all' to remove whole queue. | `!m rm 5` `!m remove`, `!m rm` | Remove a song by its # in the queue, or 'all' to remove whole queue. | `!m rm 5`
`! movesong`, `! ms` | Moves a song from one position to another. | `! ms` 5>3 `!m movesong`, `!m ms` | Moves a song from one position to another. | `!m ms` 5>3
`! cleanup` | Cleans up hanging voice connections. **Bot Owner Only!** | `!m cleanup` `!m cleanup` | Cleans up hanging voice connections. **Bot Owner Only!** | `!m cleanup`
`! reptcursong`, `! rcs` | Toggles repeat of current song. | `!m rcs` `!m reptcursong`, `!m rcs` | Toggles repeat of current song. | `!m rcs`
`! rpeatplaylst`, `! rpl` | Toggles repeat of all songs in the queue (every song that finishes is added to the end of the queue). | `!m rpl` `!m rpeatplaylst`, `!m rpl` | Toggles repeat of all songs in the queue (every song that finishes is added to the end of the queue). | `!m rpl`
`! save` | Saves a playlist under a certain name. Name must be no longer than 20 characters and mustn't contain dashes. | `!m save classical1` `!m save` | Saves a playlist under a certain name. Name must be no longer than 20 characters and mustn't contain dashes. | `!m save classical1`
`! load` | Loads a playlist under a certain name. | `!m load classical-1` `!m load` | Loads a playlist under a certain name. | `!m load classical-1`
`! playlists`, `! pls` | Lists all playlists. Paginated. 20 per page. Default page is 0. | `!m pls 1` `!m playlists`, `!m pls` | Lists all playlists. Paginated. 20 per page. Default page is 0. | `!m pls 1`
`! deleteplaylist`, `! delpls` | Deletes a saved playlist. Only if you made it or if you are the bot owner. | `!m delpls animu-5` `!m deleteplaylist`, `!m delpls` | Deletes a saved playlist. Only if you made it or if you are the bot owner. | `!m delpls animu-5`
`! goto` | Goes to a specific time in seconds in a song. `!m goto` | Goes to a specific time in seconds in a song.
`! getlink`, `! gl` | Shows a link to the currently playing song. `!m getlink`, `!m gl` | Shows a link to the currently playing song.
`! autoplay`, `! ap` | Toggles autoplay - When the song is finished, automatically queue a related youtube song. (Works only for youtube songs and when queue is empty) `!m autoplay`, `!m ap` | Toggles autoplay - When the song is finished, automatically queue a related youtube song. (Works only for youtube songs and when queue is empty)
### Searches ### Searches
Command and aliases | Description | Usage Command and aliases | Description | Usage