finish ChannelUpdate responder

This commit is contained in:
sam 2024-08-20 18:18:17 +02:00
parent eb40872254
commit df8af75dd4
14 changed files with 155 additions and 63 deletions

View file

@ -1,5 +1,4 @@
using System.ComponentModel;
using Catalogger.Backend.Cache;
using Catalogger.Backend.Cache.InMemoryCache;
using Catalogger.Backend.Database;
using Catalogger.Backend.Database.Queries;

View file

@ -1,4 +1,3 @@
using Catalogger.Backend.Cache;
using Catalogger.Backend.Cache.InMemoryCache;
using Catalogger.Backend.Database;
using Catalogger.Backend.Database.Queries;
@ -152,8 +151,8 @@ public class ChannelCommandsComponents(
var channelId = WebhookExecutorService.GetDefaultLogChannel(guildConfig, logChannelType);
string? channelMention;
if (channelId is null or 0) channelMention = null;
else if (guildChannels.All(c => c.ID != channelId.Value)) channelMention = $"unknown channel {channelId}";
if (channelId is 0) channelMention = null;
else if (guildChannels.All(c => c.ID != channelId)) channelMention = $"unknown channel {channelId}";
else channelMention = $"<#{channelId}>";
List<IEmbed> embeds =

View file

@ -1,19 +1,15 @@
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text.Json;
using App.Metrics;
using Catalogger.Backend.Cache;
using Catalogger.Backend.Cache.InMemoryCache;
using Catalogger.Backend.Database;
using Catalogger.Backend.Extensions;
using Humanizer;
using Microsoft.EntityFrameworkCore;
using Remora.Commands.Attributes;
using Remora.Commands.Groups;
using Remora.Discord.API.Abstractions.Objects;
using Remora.Discord.API.Abstractions.Rest;
using Remora.Discord.API.Objects;
using Remora.Discord.Commands.Contexts;
using Remora.Discord.Commands.Extensions;
using Remora.Discord.Commands.Feedback.Services;