!!fp added
This commit is contained in:
parent
824916a41e
commit
3526f956c3
@ -34,7 +34,7 @@ namespace NadekoBot.Modules.Music.Classes
|
||||
/// Player will prioritize different queuer name
|
||||
/// over the song position in the playlist
|
||||
/// </summary>
|
||||
public bool FairPlay { get; set; } = false;
|
||||
public bool FairPlay { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Users who recently got their music wish
|
||||
@ -214,7 +214,7 @@ namespace NadekoBot.Modules.Music.Classes
|
||||
}
|
||||
|
||||
recentlyPlayedUsers.Add(song.QueuerName);
|
||||
return song ?? playlist.FirstOrDefault();
|
||||
return song;
|
||||
}
|
||||
|
||||
public void Shuffle()
|
||||
|
@ -126,6 +126,20 @@ namespace NadekoBot.Modules.Music
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task Fairplay(IUserMessage umsg)
|
||||
{
|
||||
var channel = (ITextChannel)umsg.Channel;
|
||||
MusicPlayer musicPlayer;
|
||||
if (!MusicPlayers.TryGetValue(channel.Guild.Id, out musicPlayer)) return;
|
||||
if (((IGuildUser)umsg.Author).VoiceChannel != musicPlayer.PlaybackVoiceChannel)
|
||||
return;
|
||||
var val = musicPlayer.FairPlay = !musicPlayer.FairPlay;
|
||||
|
||||
await channel.SendConfirmAsync("Fair play " + (val ? "enabled" : "disabled") + ".").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task Queue(IUserMessage umsg, [Remainder] string query)
|
||||
|
39
src/NadekoBot/Resources/CommandStrings.Designer.cs
generated
39
src/NadekoBot/Resources/CommandStrings.Designer.cs
generated
@ -1374,7 +1374,7 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to `{0}cm "module name" enable SomeChannel`.
|
||||
/// Looks up a localized string similar to `{0}cm ModuleName enable SomeChannel`.
|
||||
/// </summary>
|
||||
public static string chnlmdl_usage {
|
||||
get {
|
||||
@ -2435,6 +2435,33 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to fairplay fp.
|
||||
/// </summary>
|
||||
public static string fairplay_cmd {
|
||||
get {
|
||||
return ResourceManager.GetString("fairplay_cmd", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Toggles fairplay. While enabled, music player will prioritize songs from users who didn't have their song recently played instead of the song's position in the queue..
|
||||
/// </summary>
|
||||
public static string fairplay_desc {
|
||||
get {
|
||||
return ResourceManager.GetString("fairplay_desc", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to `{0}fp`.
|
||||
/// </summary>
|
||||
public static string fairplay_usage {
|
||||
get {
|
||||
return ResourceManager.GetString("fairplay_usage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to fw.
|
||||
/// </summary>
|
||||
@ -5856,7 +5883,7 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to `{0}rm "module name" enable MyRole`.
|
||||
/// Looks up a localized string similar to `{0}rm ModuleName enable MyRole`.
|
||||
/// </summary>
|
||||
public static string rolemdl_usage {
|
||||
get {
|
||||
@ -5901,7 +5928,7 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Rolls 0-100. If you supply a number [x] it rolls up to 30 normal dice. If you split 2 numbers with letter d (xdy) it will roll x dice from 1 to y..
|
||||
/// Looks up a localized string similar to Rolls 0-100. If you supply a number [x] it rolls up to 30 normal dice. If you split 2 numbers with letter d (xdy) it will roll x dice from 1 to y. Y can be a letter 'F' if you want to roll fate dice instead of dnd..
|
||||
/// </summary>
|
||||
public static string roll_desc {
|
||||
get {
|
||||
@ -5910,7 +5937,7 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to `{0}roll` or `{0}roll 7` or `{0}roll 3d5`.
|
||||
/// Looks up a localized string similar to `{0}roll` or `{0}roll 7` or `{0}roll 3d5` or `{0}roll 5dF`.
|
||||
/// </summary>
|
||||
public static string roll_usage {
|
||||
get {
|
||||
@ -6909,7 +6936,7 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to `{0}sm "module name" enable`.
|
||||
/// Looks up a localized string similar to `{0}sm ModuleName enable`.
|
||||
/// </summary>
|
||||
public static string srvrmdl_usage {
|
||||
get {
|
||||
@ -7692,7 +7719,7 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to `{0}um "module name" enable SomeUsername`.
|
||||
/// Looks up a localized string similar to `{0}um ModuleName enable SomeUsername`.
|
||||
/// </summary>
|
||||
public static string usrmdl_usage {
|
||||
get {
|
||||
|
@ -2817,4 +2817,13 @@
|
||||
<data name="log_usage" xml:space="preserve">
|
||||
<value>`{0}log userpresence` or `{0}log userbanned`</value>
|
||||
</data>
|
||||
<data name="fairplay_cmd" xml:space="preserve">
|
||||
<value>fairplay fp</value>
|
||||
</data>
|
||||
<data name="fairplay_desc" xml:space="preserve">
|
||||
<value>Toggles fairplay. While enabled, music player will prioritize songs from users who didn't have their song recently played instead of the song's position in the queue.</value>
|
||||
</data>
|
||||
<data name="fairplay_usage" xml:space="preserve">
|
||||
<value>`{0}fp`</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user