mirror of
https://github.com/yawaflua/PL_JusticeBot.git
synced 2026-02-04 10:34:13 +02:00
updated
This commit is contained in:
31
Justice/Commands/Getters.cs
Normal file
31
Justice/Commands/Getters.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user