Files
PL_JusticeBot/Justice/Commands/Cities.cs
Дмитрий Шиманский b8db704fef add base on map registration
2023-11-16 19:08:16 +03:00

27 lines
1.2 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 Cities : InteractionModuleBase<SocketInteractionContext>
{
[SlashCommand("cities-embed", "Отправляет сообщение с кнопками для регистрации")]
[DefaultMemberPermissions(GuildPermission.Administrator)]
public async Task sendCityEmbed()
{
await DeferAsync(true);
var Embed = new EmbedBuilder()
.WithTitle("**Регистрация базы на карту!**")
.WithDescription("Ниже вы можете нажать на кнопку для подачи заявки на добавления базы на карту!")
.WithColor(Color.Blue)
.Build();
var Components = new ComponentBuilder()
.WithButton(new ButtonBuilder() { CustomId = "addBaseOnMap", Label = "Добавить", Style = ButtonStyle.Success})
.Build();
await Context.Channel.SendMessageAsync(embed: Embed, components: Components);
await FollowupAsync("OK!");//, ephemeral: true);
}
}
}