diff --git a/src/FMBot.Bot/Resources/InteractionConstants.cs b/src/FMBot.Bot/Resources/InteractionConstants.cs index dcec617d..80aeb4e3 100644 --- a/src/FMBot.Bot/Resources/InteractionConstants.cs +++ b/src/FMBot.Bot/Resources/InteractionConstants.cs @@ -107,6 +107,7 @@ public static class SupporterLinks { public const string GetPurchaseLink = "supporter-purchase-link"; public const string GetManageLink = "supporter-manage-link"; + public const string ViewPerks = "supporter-view-perks"; } public const string BotScrobblingEnable = "user-setting-botscrobbling-enable"; diff --git a/src/FMBot.Bot/SlashCommands/StaticSlashCommands.cs b/src/FMBot.Bot/SlashCommands/StaticSlashCommands.cs index 1d29825e..cd234185 100644 --- a/src/FMBot.Bot/SlashCommands/StaticSlashCommands.cs +++ b/src/FMBot.Bot/SlashCommands/StaticSlashCommands.cs @@ -63,6 +63,17 @@ public async Task SupportersAsync() this.Context.LogCommandUsed(response.CommandResponse); } + [ComponentInteraction(InteractionConstants.SupporterLinks.ViewPerks)] + [UserSessionRequired] + public async Task SupporterPerks() + { + var contextUser = await this._userService.GetUserSettingsAsync(this.Context.User); + var response = await this._staticBuilders.DonateAsync(new ContextModel(this.Context, contextUser)); + + await this.Context.SendResponse(this.Interactivity, response, true); + this.Context.LogCommandUsed(response.CommandResponse); + } + [ComponentInteraction($"{InteractionConstants.SupporterLinks.GetPurchaseLink}-*")] [UserSessionRequired] public async Task GetSupporterLink(string type) diff --git a/src/FMBot.Bot/TextCommands/AdminCommands.cs b/src/FMBot.Bot/TextCommands/AdminCommands.cs index bba6d661..14d61e69 100644 --- a/src/FMBot.Bot/TextCommands/AdminCommands.cs +++ b/src/FMBot.Bot/TextCommands/AdminCommands.cs @@ -864,6 +864,7 @@ await ReplyAsync("Enter an username to check\n" + { isBannedSomewhere = true; } + if (bottedUser != null) { this._embed.AddField("Reason / additional notes", bottedUser.Notes ?? "*No reason/notes*"); @@ -1943,6 +1944,7 @@ public async Task UpdateSingleDiscordSupporters([Remainder] string user) this.Context.LogCommandUsed(CommandResponse.NoPermission); } } + [Command("updatemultidiscordsupporters")] [Summary("Updates multiple discord supporter")] public async Task UpdateMultipleDiscordSupporters([Remainder] string user) @@ -2352,11 +2354,20 @@ public async Task GetSupporterTestLink([Remainder] string user = null) { if (await this._adminService.HasCommandAccessAsync(this.Context.User, UserType.Admin)) { - var components = new ComponentBuilder().WithButton("Generate link", - customId: InteractionConstants.SupporterLinks.GetPurchaseLink); + var components = new ComponentBuilder() + .WithButton("Get monthly", customId: $"{InteractionConstants.SupporterLinks.GetPurchaseLink}-monthly") + .WithButton("Get yearly", customId: $"{InteractionConstants.SupporterLinks.GetPurchaseLink}-yearly") + .WithButton("View perks", customId: InteractionConstants.SupporterLinks.ViewPerks); - await ReplyAsync($"Use the button below to get your unique purchase link", - allowedMentions: AllowedMentions.None, components: components.Build()); + var embed = new EmbedBuilder(); + embed.WithDescription("⭐ Support .fmbot with .fmbot supporter and unlock extra perks"); + embed.AddField("Monthly - $3.99", + "-# $3.99 per month", true); + embed.AddField("Yearly - $29.99", + "-# $2.49 per month", true); + embed.WithColor(DiscordConstants.InformationColorBlue); + + await ReplyAsync(embed: embed.Build(), components: components.Build()); this.Context.LogCommandUsed(); } else @@ -2749,7 +2760,10 @@ public async Task LastfmIssue(string _ = null) await ReplyAsync(null, embed: embed.Build(), allowedMentions: AllowedMentions.None, components: components.Build()); - if (this.Context.Channel is SocketThreadChannel { ParentChannel: SocketForumChannel forumChannel } threadChannel && + if (this.Context.Channel is SocketThreadChannel + { + ParentChannel: SocketForumChannel forumChannel + } threadChannel && forumChannel.Tags.Any()) { var tagToApply = forumChannel.Tags.FirstOrDefault(f => f.Name == "Last.fm issue");