Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a71f65de55 | ||
![]() |
3fd19eb149 | ||
![]() |
bc7e493e71 |
@@ -46,9 +46,9 @@ namespace TomatenMusic_Api
|
||||
if (e.Response.IsPlaylist)
|
||||
{
|
||||
if (e.Now)
|
||||
await player.PlayPlaylistNowAsync(e.Response.Playlist);
|
||||
await player.PlayNowAsync(e.Response.Playlist);
|
||||
else
|
||||
await player.PlayPlaylistAsync(e.Response.Playlist);
|
||||
await player.PlayItemAsync(e.Response.Playlist);
|
||||
}else
|
||||
{
|
||||
if (e.Now)
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>TomatenMusic_Api</RootNamespace>
|
||||
<RestoreAdditionalProjectSources>
|
||||
https://api.nuget.org/v3/index.json;
|
||||
https://nuget.emzi0767.com/api/v3/index.json
|
||||
</RestoreAdditionalProjectSources>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@@ -84,7 +84,7 @@ namespace TomatenMusic.Commands
|
||||
if (response.IsPlaylist)
|
||||
{
|
||||
ILavalinkPlaylist playlist = response.Playlist;
|
||||
await player.PlayPlaylistNowAsync(playlist);
|
||||
await player.PlayNowAsync(playlist);
|
||||
|
||||
_ = ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("Now Playing:").AddEmbed(
|
||||
Common.AsEmbed(playlist)
|
||||
@@ -237,7 +237,7 @@ namespace TomatenMusic.Commands
|
||||
if (response.IsPlaylist)
|
||||
{
|
||||
ILavalinkPlaylist playlist = response.Playlist;
|
||||
await player.PlayPlaylistAsync(playlist);
|
||||
await player.PlayItemAsync(playlist);
|
||||
|
||||
await ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("Now Playing:").AddEmbed(
|
||||
Common.AsEmbed(playlist)
|
||||
|
@@ -64,26 +64,6 @@ namespace TomatenMusic.Music
|
||||
QueuePrompt.UpdateFor(GuildId);
|
||||
}
|
||||
|
||||
public async Task PlayPlaylistAsync(ILavalinkPlaylist playlist)
|
||||
{
|
||||
EnsureNotDestroyed();
|
||||
EnsureConnected();
|
||||
|
||||
_logger.LogInformation("Started playing Playlist {0} on Guild {1}", playlist.Title, (await GetGuildAsync()).Name);
|
||||
|
||||
|
||||
QueuePrompt.UpdateFor(GuildId);
|
||||
}
|
||||
|
||||
public async Task PlayPlaylistNowAsync(ILavalinkPlaylist playlist)
|
||||
{
|
||||
EnsureConnected();
|
||||
EnsureNotDestroyed();
|
||||
|
||||
|
||||
QueuePrompt.UpdateFor(GuildId);
|
||||
}
|
||||
|
||||
public async Task RewindAsync()
|
||||
{
|
||||
EnsureNotDestroyed();
|
||||
|
@@ -4,17 +4,13 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RestoreAdditionalProjectSources>
|
||||
https://api.nuget.org/v3/index.json;
|
||||
https://nuget.emzi0767.com/api/v3/index.json
|
||||
</RestoreAdditionalProjectSources>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DSharpPlus" Version="4.2.0-nightly-01101" />
|
||||
<PackageReference Include="DSharpPlus.Interactivity" Version="4.2.0-nightly-01101" />
|
||||
<PackageReference Include="DSharpPlus.SlashCommands" Version="4.2.0-nightly-01101" />
|
||||
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.56.0.2630" />
|
||||
<PackageReference Include="DSharpPlus" Version="4.2.0-nightly-01107" />
|
||||
<PackageReference Include="DSharpPlus.Interactivity" Version="4.2.0-nightly-01107" />
|
||||
<PackageReference Include="DSharpPlus.SlashCommands" Version="4.2.0-nightly-01107" />
|
||||
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.57.0.2637" />
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.42" />
|
||||
<PackageReference Include="Lavalink4NET" Version="2.1.1" />
|
||||
<PackageReference Include="Lavalink4NET.DSharpPlus" Version="2.1.1" />
|
||||
|
Reference in New Issue
Block a user