mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
- Re-added .qap / .queueautoplay
- Several strings and commands related to music have been changed - Changed .ms / .movesong to .tm / .trackmove but kept old aliases - Changed ~~song~~ -> rack throughout music module strings - Updated CHANGELOG.md
This commit is contained in:
@@ -156,7 +156,12 @@ public sealed class MusicService : IMusicService
|
||||
|
||||
_outputChannels[guildId] = (defaultChannel, overrideChannel);
|
||||
|
||||
var mp = new MusicPlayer(queue, resolver, proxy, settings.QualityPreset);
|
||||
var mp = new MusicPlayer(queue,
|
||||
resolver,
|
||||
proxy,
|
||||
_googleApiService,
|
||||
settings.QualityPreset,
|
||||
settings.AutoPlay);
|
||||
|
||||
mp.SetRepeat(settings.PlayerRepeat);
|
||||
|
||||
@@ -191,7 +196,7 @@ public sealed class MusicService : IMusicService
|
||||
_ = lastFinishedMessage?.DeleteAsync();
|
||||
var embed = _eb.Create()
|
||||
.WithOkColor()
|
||||
.WithAuthor(GetText(guildId, strs.finished_song), Music.MUSIC_ICON_URL)
|
||||
.WithAuthor(GetText(guildId, strs.finished_track), Music.MUSIC_ICON_URL)
|
||||
.WithDescription(trackInfo.PrettyName())
|
||||
.WithFooter(trackInfo.PrettyTotalTime());
|
||||
|
||||
@@ -207,7 +212,7 @@ public sealed class MusicService : IMusicService
|
||||
_ = lastPlayingMessage?.DeleteAsync();
|
||||
var embed = _eb.Create()
|
||||
.WithOkColor()
|
||||
.WithAuthor(GetText(guildId, strs.playing_song(index + 1)), Music.MUSIC_ICON_URL)
|
||||
.WithAuthor(GetText(guildId, strs.playing_track(index + 1)), Music.MUSIC_ICON_URL)
|
||||
.WithDescription(trackInfo.PrettyName())
|
||||
.WithFooter($"{mp.PrettyVolume()} | {trackInfo.PrettyInfo()}");
|
||||
|
||||
@@ -288,7 +293,7 @@ public sealed class MusicService : IMusicService
|
||||
|
||||
public IEnumerable<(string Name, Func<string> Func)> GetPlaceholders()
|
||||
{
|
||||
// random song that's playing
|
||||
// random track that's playing
|
||||
yield return ("%music.playing%", () =>
|
||||
{
|
||||
var randomPlayingTrack = _players.Select(x => x.Value.GetCurrentTrack(out _))
|
||||
@@ -438,5 +443,17 @@ public sealed class MusicService : IMusicService
|
||||
},
|
||||
preset);
|
||||
|
||||
public async Task<bool> ToggleQueueAutoPlayAsync(ulong guildId)
|
||||
{
|
||||
var newValue = false;
|
||||
await ModifySettingsInternalAsync(guildId,
|
||||
(settings, _) => newValue = settings.AutoPlay = !settings.AutoPlay,
|
||||
false);
|
||||
|
||||
if (TryGetMusicPlayer(guildId, out var mp))
|
||||
mp.AutoPlay = newValue;
|
||||
return newValue;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
Reference in New Issue
Block a user