feat: invite delete event
This commit is contained in:
parent
c86f94e497
commit
538abb9bad
3 changed files with 105 additions and 19 deletions
|
|
@ -32,6 +32,7 @@ public class InviteCommands(
|
|||
GuildCache guildCache,
|
||||
IInviteCache inviteCache,
|
||||
IDiscordRestChannelAPI channelApi,
|
||||
IDiscordRestGuildAPI guildApi,
|
||||
FeedbackService feedbackService,
|
||||
ContextInjectionService contextInjection
|
||||
) : CommandGroup
|
||||
|
|
@ -43,7 +44,7 @@ public class InviteCommands(
|
|||
public async Task<IResult> ListInvitesAsync()
|
||||
{
|
||||
var (userId, guildId) = contextInjection.GetUserAndGuild();
|
||||
var guildInvites = await inviteCache.TryGetAsync(guildId);
|
||||
var guildInvites = await guildApi.GetGuildInvitesAsync(guildId).GetOrThrow();
|
||||
if (!guildCache.TryGet(guildId, out var guild))
|
||||
throw new CataloggerError("Guild not in cache");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue