добавил переделывание паспортов

This commit is contained in:
Дмитрий Шиманский
2023-10-26 19:57:40 +03:00
parent b4f1dfdbb4
commit d612c80bc9
13 changed files with 622 additions and 63 deletions

View File

@@ -15,30 +15,17 @@ namespace DiscordApp.Discord.Commands
[DefaultMemberPermissions(GuildPermission.Administrator)]
public async Task addAutoBranches(IChannel channel, string branchName = "Обсуждение")
{
await RespondAsync($"Автоветки для канала {channel.Name} настроены", ephemeral: true);
//await DeferAsync(true);
Autobranches autobranches = new()
{
ChannelId = channel.Id,
BranchName = branchName
};
Startup.appDbContext.Autobranches.Add(autobranches);
await Startup.appDbContext.SaveChangesAsync();
await FollowupAsync($"Автоветки для канала <#{channel.Id}> настроены", ephemeral: true);
}
[SlashCommand("emotes", "Настройка автоэмоций")]
[DefaultMemberPermissions(GuildPermission.Administrator)]
public async Task addAutoReact(string emote, IChannel channel)
{
var emotes = Emote.Parse(emote);
await RespondAsync($"Автореакция {emotes.Url} для канала {channel.Name} настроены", ephemeral: true);
Autoreactions autoreactions = new()
{
ChannelId = channel.Id,
EmoteId = emotes.ToString()
};
Startup.appDbContext.Autoreactions.Add(autoreactions);
}
[SlashCommand("embed", "Отправить эмбед")]
[DefaultMemberPermissions(GuildPermission.Administrator)]