Files
PL_JusticeBot/Justice/Commands/Getters.cs
Дмитрий Шиманский 119e367e56 add settings
2023-11-11 23:37:41 +03:00

55 lines
2.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Discord.Interactions;
using Discord;
namespace DiscordApp.Justice.Commands
{
public class Getters : InteractionModuleBase<SocketInteractionContext>
{
[SlashCommand("embed-getter-passport", "Отправляет сообщение для поиска паспорта")]
[DefaultMemberPermissions(GuildPermission.Administrator)]
public async Task getPassport()
{
await DeferAsync(true);
var embed = new EmbedBuilder()
.WithTitle("Получение информации о паспорте")
.WithDescription("Нажав на кнопку ниже вы можете получить данные о том, или ином игроке")
.WithColor(Color.DarkBlue)
.Build();
var components = new ComponentBuilder()
.WithButton(new ButtonBuilder()
{
CustomId = "searchPassport",
Label = "Поиск паспорта",
Style = ButtonStyle.Success
})
.Build();
var channel = Context.Channel as ITextChannel;
await channel.SendMessageAsync(embed: embed, components: components);
await FollowupAsync("Готово!", ephemeral: true);
}
[SlashCommand("getter-notary", "Отправляет сообщение для поиска сертификата нотариуса")]
[DefaultMemberPermissions(GuildPermission.Administrator)]
public async Task getCertificate()
{
await DeferAsync(true);
var embed = new EmbedBuilder()
.WithTitle("Получение информации о сертификате")
.WithDescription("Нажав на кнопку ниже вы можете получить данные о заверенном документе")
.WithColor(Color.DarkBlue)
.Build();
var components = new ComponentBuilder()
.WithButton(new ButtonBuilder()
{
CustomId = "searchCertificate",
Label = "Поиск сертификата",
Style = ButtonStyle.Success
})
.Build();
var channel = Context.Channel as ITextChannel;
await channel.SendMessageAsync(embed: embed, components: components);
await FollowupAsync("Готово!", ephemeral: true);
}
}
}