public async ValueTask HandleChannelDeleted(object sender, ChannelDeletedEventArgs e) { foreach (var service in ChannelDeletedServices) { await ExecuteAsync((service, e) => service.OnChannelDeleted(e), service, e).ConfigureAwait(false); } }
public async Task HandleAsync(ChannelDeletedEventArgs args) { using var ctx = new AdminDatabaseContext(_provider); var reactionRoles = await ctx.ReactionRoles.Where(x => x.ChannelId == args.Channel.Id) .ToListAsync(); if (reactionRoles.Count > 0) { ctx.ReactionRoles.RemoveRange(reactionRoles); } }
private async void ChannelTrackingStatusDeleted(object sender, ChannelDeletedEventArgs e) { await RemoveChannel(e.ChannelId); }
protected internal virtual ValueTask OnChannelDeleted(ChannelDeletedEventArgs e) => default;