mirror of
https://github.com/yawaflua/PL_JusticeBot.git
synced 2025-12-10 12:29:31 +02:00
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
This commit is contained in:
@@ -20,7 +20,7 @@ namespace DiscordApp.Justice.Interactions
|
|||||||
var paymentData = new spworlds.Types.PaymentData()
|
var paymentData = new spworlds.Types.PaymentData()
|
||||||
{
|
{
|
||||||
Amount = 16,
|
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}",
|
RedirectUrl = $"https://discord.yawaflua.ru/redirects/{redirectUri}&channelid={thread.Id}",
|
||||||
WebHookUrl = $"https://discord.yawaflua.ru/redirects/{redirectUri}"
|
WebHookUrl = $"https://discord.yawaflua.ru/redirects/{redirectUri}"
|
||||||
};
|
};
|
||||||
@@ -28,7 +28,7 @@ namespace DiscordApp.Justice.Interactions
|
|||||||
var redirectTable = new Redirects() { Id = redirectUri , url = uri};
|
var redirectTable = new Redirects() { Id = redirectUri , url = uri};
|
||||||
Startup.appDbContext.Redirects.Add(redirectTable);
|
Startup.appDbContext.Redirects.Add(redirectTable);
|
||||||
Startup.appDbContext.SaveChanges();
|
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),
|
.WithValue(modal.xCoordinate),
|
||||||
new EmbedFieldBuilder()
|
new EmbedFieldBuilder()
|
||||||
.WithName("Y Координата")
|
.WithName("Y Координата")
|
||||||
.WithValue(modal.yCoordinate),
|
.WithValue(modal.zCoordinate),
|
||||||
};
|
};
|
||||||
var footer = new EmbedFooterBuilder()
|
var footer = new EmbedFooterBuilder()
|
||||||
.WithText(Context.User.Id.ToString())
|
.WithText(Context.User.Id.ToString())
|
||||||
@@ -69,9 +69,10 @@ namespace DiscordApp.Justice.Interactions
|
|||||||
.WithFields(fields)
|
.WithFields(fields)
|
||||||
.Build();
|
.Build();
|
||||||
var channel = Context.Guild.GetTextChannel(1174722397820174439);
|
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);
|
await FollowupAsync("Заявка подана и передана ответственным лицам. Ожидайте!", ephemeral: true);
|
||||||
var threadChannel = Context.Channel as IThreadChannel;
|
var threadChannel = Context.Channel as IThreadChannel;
|
||||||
|
await threadChannel.RemoveUserAsync((IGuildUser)Context.User);
|
||||||
await threadChannel.ModifyAsync(k => k.Archived = true);
|
await threadChannel.ModifyAsync(k => k.Archived = true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ namespace DiscordApp.Justice.Modals
|
|||||||
[ModalTextInput("xCoordinate", TextInputStyle.Short, placeholder: "70", maxLength: 10)]
|
[ModalTextInput("xCoordinate", TextInputStyle.Short, placeholder: "70", maxLength: 10)]
|
||||||
public int xCoordinate { get; set; }
|
public int xCoordinate { get; set; }
|
||||||
|
|
||||||
[InputLabel("Y координата")]
|
[InputLabel("Z координата")]
|
||||||
[ModalTextInput("yCoordinate", TextInputStyle.Short, placeholder: "90", maxLength: 10)]
|
[ModalTextInput("yCoordinate", TextInputStyle.Short, placeholder: "90", maxLength: 10)]
|
||||||
public int yCoordinate { get; set; }
|
public int zCoordinate { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user