From c1577b10733229ce1827c9047558a6eedbe0fe4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=A8=D0=B8?= =?UTF-8?q?=D0=BC=D0=B0=D0=BD=D1=81=D0=BA=D0=B8=D0=B9?= Date: Tue, 21 Nov 2023 13:03:51 +0300 Subject: [PATCH] hotfix: y cordinate change to z, for better using add type into data-spworlds, for next updates remove user after payment, for fix, when user can give 2 and more requests change "@ #here" to ping yawaflua: delete dev-utilities ping yawaflua into thread chanel --- Justice/Interactions/CitiesInteractions.cs | 9 +++++---- Justice/Modals/CitiesModal.cs | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Justice/Interactions/CitiesInteractions.cs b/Justice/Interactions/CitiesInteractions.cs index a0403bf..12db1b4 100644 --- a/Justice/Interactions/CitiesInteractions.cs +++ b/Justice/Interactions/CitiesInteractions.cs @@ -20,7 +20,7 @@ namespace DiscordApp.Justice.Interactions var paymentData = new spworlds.Types.PaymentData() { Amount = 16, - Data = $"user:{Context.User.Id};channel:{thread.Id};", + Data = $"user:{Context.User.Id};channel:{thread.Id};uri:{redirectUri};type:addSityOnMap;", RedirectUrl = $"https://discord.yawaflua.ru/redirects/{redirectUri}&channelid={thread.Id}", WebHookUrl = $"https://discord.yawaflua.ru/redirects/{redirectUri}" }; @@ -28,7 +28,7 @@ namespace DiscordApp.Justice.Interactions var redirectTable = new Redirects() { Id = redirectUri , url = uri}; Startup.appDbContext.Redirects.Add(redirectTable); Startup.appDbContext.SaveChanges(); - await thread.SendMessageAsync("Нажмите на кнопку ниже для оплаты", components: new ComponentBuilder().WithButton("Оплатить", url: $"https://discord.yawaflua.ru/redirects/{redirectUri}", style: ButtonStyle.Link).Build()); + await thread.SendMessageAsync($"Нажмите на кнопку ниже для оплаты \n {Context.User.Mention} <@945317832290336798>", components: new ComponentBuilder().WithButton("Оплатить", url: $"https://discord.yawaflua.ru/redirects/{redirectUri}", style: ButtonStyle.Link).Build()); } @@ -53,7 +53,7 @@ namespace DiscordApp.Justice.Interactions .WithValue(modal.xCoordinate), new EmbedFieldBuilder() .WithName("Y Координата") - .WithValue(modal.yCoordinate), + .WithValue(modal.zCoordinate), }; var footer = new EmbedFooterBuilder() .WithText(Context.User.Id.ToString()) @@ -69,9 +69,10 @@ namespace DiscordApp.Justice.Interactions .WithFields(fields) .Build(); var channel = Context.Guild.GetTextChannel(1174722397820174439); - await channel.SendMessageAsync("@ #here", embed: embed, components: components); + await channel.SendMessageAsync("<@945317832290336798>", embed: embed, components: components); await FollowupAsync("Заявка подана и передана ответственным лицам. Ожидайте!", ephemeral: true); var threadChannel = Context.Channel as IThreadChannel; + await threadChannel.RemoveUserAsync((IGuildUser)Context.User); await threadChannel.ModifyAsync(k => k.Archived = true); } diff --git a/Justice/Modals/CitiesModal.cs b/Justice/Modals/CitiesModal.cs index 498a59e..fe566fe 100644 --- a/Justice/Modals/CitiesModal.cs +++ b/Justice/Modals/CitiesModal.cs @@ -19,9 +19,9 @@ namespace DiscordApp.Justice.Modals [ModalTextInput("xCoordinate", TextInputStyle.Short, placeholder: "70", maxLength: 10)] public int xCoordinate { get; set; } - [InputLabel("Y координата")] + [InputLabel("Z координата")] [ModalTextInput("yCoordinate", TextInputStyle.Short, placeholder: "90", maxLength: 10)] - public int yCoordinate { get; set; } + public int zCoordinate { get; set; } } }