mirror of
https://github.com/yawaflua/PL_JusticeBot.git
synced 2025-12-09 20:09:31 +02:00
add settings
This commit is contained in:
@@ -27,5 +27,28 @@ namespace DiscordApp.Justice.Commands
|
|||||||
await channel.SendMessageAsync(embed: embed, components: components);
|
await channel.SendMessageAsync(embed: embed, components: components);
|
||||||
await FollowupAsync("Готово!", ephemeral: true);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,6 +81,11 @@ namespace DiscordApp.Discord.Commands
|
|||||||
public async Task giveAvanse()
|
public async Task giveAvanse()
|
||||||
{
|
{
|
||||||
await DeferAsync(true);
|
await DeferAsync(true);
|
||||||
|
if (Context.User.Id != 945317832290336798)
|
||||||
|
{
|
||||||
|
await FollowupAsync("sosi", ephemeral:true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
int allCount = 0;
|
int allCount = 0;
|
||||||
var allReports = Startup.appDbContext.Reports.ToArray();
|
var allReports = Startup.appDbContext.Reports.ToArray();
|
||||||
var allEmployee = new Dictionary<string, int>();
|
var allEmployee = new Dictionary<string, int>();
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Discord.Interactions;
|
using Discord.Interactions;
|
||||||
using Discord.WebSocket;
|
using Discord.WebSocket;
|
||||||
using DiscordApp.Database;
|
using DiscordApp.Database;
|
||||||
|
using DiscordApp.Justice.Commands;
|
||||||
using Microsoft.VisualBasic;
|
using Microsoft.VisualBasic;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@@ -40,7 +41,9 @@ namespace DiscordApp
|
|||||||
|
|
||||||
private async Task ReadyAsync()
|
private async Task ReadyAsync()
|
||||||
{
|
{
|
||||||
|
|
||||||
HttpClient http = new HttpClient();
|
HttpClient http = new HttpClient();
|
||||||
|
|
||||||
await handler.RegisterCommandsGloballyAsync(true);
|
await handler.RegisterCommandsGloballyAsync(true);
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user