fix: Fix method
This commit is contained in:
parent
79e7cffb4e
commit
2ca985d248
14 changed files with 47 additions and 47 deletions
|
|
@ -63,7 +63,7 @@ internal sealed class ClearQueueCommand : BaseCommand
|
|||
Description = $"`{this.GetGuildString(CommandKey.ClearQueue.VoteStarted)} ({MusicPlugin.Plugin!.Guilds![ctx.Guild.Id].collectedClearQueueVotes.Count}/{Math.Ceiling((conn.Channel.Users.Count - 1.0) * 0.51)})`",
|
||||
}.AsAwaitingInput(ctx);
|
||||
|
||||
var builder = new DiscordMessageBuilder().WithEmbed(embed);
|
||||
var builder = new DiscordMessageBuilder().AddEmbed(embed);
|
||||
|
||||
DiscordButtonComponent DisconnectVote = new(ButtonStyle.Danger, Guid.NewGuid().ToString(), this.GetGuildString(CommandKey.ClearQueue.VoteButton), false, new DiscordComponentEmoji(DiscordEmoji.FromUnicode("🗑")));
|
||||
_ = builder.AddComponents(DisconnectVote);
|
||||
|
|
@ -110,7 +110,7 @@ internal sealed class ClearQueueCommand : BaseCommand
|
|||
MusicPlugin.Plugin!.Guilds![ctx.Guild.Id].SongQueue = [];
|
||||
MusicPlugin.Plugin!.Guilds![ctx.Guild.Id].collectedClearQueueVotes.Clear();
|
||||
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().WithEmbed(new DiscordEmbedBuilder
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().AddEmbed(new DiscordEmbedBuilder
|
||||
{
|
||||
Description = this.GetString(CommandKey.ClearQueue.Cleared, true),
|
||||
}.AsSuccess(ctx)));
|
||||
|
|
@ -118,7 +118,7 @@ internal sealed class ClearQueueCommand : BaseCommand
|
|||
}
|
||||
|
||||
embed.Description = $"`{this.GetGuildString(CommandKey.ClearQueue.VoteStarted)} ({MusicPlugin.Plugin!.Guilds![ctx.Guild.Id].collectedClearQueueVotes.Count}/{Math.Ceiling((conn.Channel.Users.Count - 1.0) * 0.51)})`";
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().WithEmbed(embed).AddComponents(DisconnectVote));
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().AddEmbed(embed).AddComponents(DisconnectVote));
|
||||
}
|
||||
}).Add(ctx.Bot);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ internal sealed class DisconnectCommand : BaseCommand
|
|||
Description = $"`{this.GetGuildString(CommandKey.Disconnect.VoteStarted, true)} ({MusicPlugin.Plugin!.Guilds![ctx.Guild.Id].collectedDisconnectVotes.Count}/{Math.Ceiling((conn.Channel.Users.Count - 1.0) * 0.51)})`",
|
||||
}.AsAwaitingInput(ctx);
|
||||
|
||||
var builder = new DiscordMessageBuilder().WithEmbed(embed);
|
||||
var builder = new DiscordMessageBuilder().AddEmbed(embed);
|
||||
|
||||
DiscordButtonComponent DisconnectVote = new(ButtonStyle.Danger, Guid.NewGuid().ToString(), this.GetGuildString(CommandKey.Disconnect.VoteButton), false, new DiscordComponentEmoji(DiscordEmoji.FromUnicode("⛔")));
|
||||
_ = builder.AddComponents(DisconnectVote);
|
||||
|
|
@ -114,7 +114,7 @@ internal sealed class DisconnectCommand : BaseCommand
|
|||
_ = await conn.StopAsync();
|
||||
await conn.DisconnectAsync();
|
||||
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().WithEmbed(new DiscordEmbedBuilder
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().AddEmbed(new DiscordEmbedBuilder
|
||||
{
|
||||
Description = this.GetString(CommandKey.Disconnect.Disconnected, true)
|
||||
}.AsSuccess(ctx)));
|
||||
|
|
@ -122,7 +122,7 @@ internal sealed class DisconnectCommand : BaseCommand
|
|||
}
|
||||
|
||||
embed.Description = $"`{this.GetGuildString(CommandKey.Disconnect.VoteStarted, true)} ({MusicPlugin.Plugin!.Guilds![ctx.Guild.Id].collectedDisconnectVotes.Count}/{Math.Ceiling((conn.Channel.Users.Count - 1.0) * 0.51)})`";
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().WithEmbed(embed).AddComponents(DisconnectVote));
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().AddEmbed(embed).AddComponents(DisconnectVote));
|
||||
}
|
||||
}).Add(ctx.Bot);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ internal sealed class QueueCommand : BaseCommand
|
|||
if ((CurrentPage * 10) + 10 >= MusicPlugin.Plugin!.Guilds![ctx.Guild.Id].SongQueue.Length)
|
||||
NextPage = NextPage.Disable();
|
||||
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().WithEmbed(new DiscordEmbedBuilder
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().AddEmbed(new DiscordEmbedBuilder
|
||||
{
|
||||
Description = Description
|
||||
}.AsInfo(ctx))
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ internal sealed class SkipCommand : BaseCommand
|
|||
Description = $"`{this.GetGuildString(CommandKey.Skip.VoteStarted)} ({MusicPlugin.Plugin!.Guilds![ctx.Guild.Id].collectedSkips.Count}/{Math.Ceiling((conn.Channel.Users.Count - 1.0) * 0.51)})`",
|
||||
}.AsAwaitingInput(ctx);
|
||||
|
||||
var builder = new DiscordMessageBuilder().WithEmbed(embed);
|
||||
var builder = new DiscordMessageBuilder().AddEmbed(embed);
|
||||
|
||||
DiscordButtonComponent SkipSongVote = new(ButtonStyle.Danger, Guid.NewGuid().ToString(), this.GetGuildString(CommandKey.Skip.VoteButton), false, new DiscordComponentEmoji(DiscordEmoji.FromUnicode("⏩")));
|
||||
_ = builder.AddComponents(SkipSongVote);
|
||||
|
|
@ -108,7 +108,7 @@ internal sealed class SkipCommand : BaseCommand
|
|||
{
|
||||
_ = await conn.StopAsync();
|
||||
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().WithEmbed(new DiscordEmbedBuilder
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().AddEmbed(new DiscordEmbedBuilder
|
||||
{
|
||||
Description = this.GetString(CommandKey.Skip.Skipped, true),
|
||||
}.AsSuccess(ctx)));
|
||||
|
|
@ -116,7 +116,7 @@ internal sealed class SkipCommand : BaseCommand
|
|||
}
|
||||
|
||||
embed.Description = $"`{this.GetGuildString(CommandKey.Skip.VoteStarted)} ({MusicPlugin.Plugin!.Guilds![ctx.Guild.Id].collectedSkips.Count}/{Math.Ceiling((conn.Channel.Users.Count - 1.0) * 0.51)})`";
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().WithEmbed(embed).AddComponents(SkipSongVote));
|
||||
_ = await this.RespondOrEdit(new DiscordMessageBuilder().AddEmbed(embed).AddComponents(SkipSongVote));
|
||||
}
|
||||
}).Add(ctx.Bot);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue