Fix BasicTrackInfo having wrong TrackID

Add Character Limit to  TrackList Method to fix tracklists being to big for messages
This commit is contained in:
Tim Müller
2022-03-24 21:46:22 +01:00
parent 8720bf9f88
commit 021528afd1
6 changed files with 16 additions and 14 deletions

View File

@@ -32,7 +32,7 @@ namespace TomatenMusic.Prompt.Implementation
DiscordEmbedBuilder builder = new DiscordEmbedBuilder()
.WithTitle("What do you want to do with these Tracks?");
builder.WithDescription(Common.TrackListString(Tracks));
builder.WithDescription(Common.TrackListString(Tracks, 1000));
return Task.FromResult(new DiscordMessageBuilder().WithEmbed(builder.Build()));
}

View File

@@ -87,7 +87,7 @@ namespace TomatenMusic.Prompt.Implementation
{
builder.WithTitle(Title);
builder.WithDescription(Common.TrackListString(PageManager.GetPage(CurrentPage)));
builder.WithDescription(Common.TrackListString(PageManager.GetPage(CurrentPage), 4000));
List<DiscordEmbed> embeds = new List<DiscordEmbed>();
embeds.Add(builder.Build());

View File

@@ -164,6 +164,7 @@ namespace TomatenMusic.Prompt.Model
_client = client.GetShard((ulong)interaction.GuildId);
_client.ComponentInteractionCreated += Discord_ComponentInteractionCreated;
ActivePrompts.Add(this);
AddGuids();
DiscordWebhookBuilder builder = await GetWebhookMessageAsync();

View File

@@ -19,8 +19,5 @@ namespace TomatenMusic.Prompt.Option
public Func<IPromptOption, Task<IPromptOption>> UpdateMethod { get; set; }
public Func<DSharpPlus.EventArgs.ComponentInteractionCreateEventArgs, DiscordClient, IPromptOption, Task> Run { get; set; }
}
}