using System.Threading.Tasks; using DSharpPlus.Entities; using DSharpPlus.SlashCommands; using DSharpPlus.SlashCommands.Attributes; namespace Breadcraft.Commands; public class StatusCommand : ApplicationCommandModule { [SlashRequireGuild] [SlashCommand("status", "Shows bot status and information.")] public async Task OnExecute(InteractionContext command) { long openTickets = Database.GetNumberOfTickets(); long closedTickets = Database.GetNumberOfClosedTickets(); DiscordEmbed botInfo = new DiscordEmbedBuilder() .WithAuthor("BreadCraft-staff/Breadcraft-Support @ GitHub", "https://github.com/BreadCraft-staff/Breadcraft-Support", "https://cdn.discordapp.com/attachments/765441543100170271/905694651573489674/german_breadcraft.png") .WithTitle("Bot information") .WithColor(DiscordColor.Cyan) .AddField("Version:", Breadcraft.GetVersion()) .AddField("Open tickets:", openTickets + "", true) .AddField("Closed tickets:", closedTickets + " ", true); await command.CreateResponseAsync(botInfo); } }