예제 #1
0
 public async ValueTask HandleChannelDeleted(object sender, ChannelDeletedEventArgs e)
 {
     foreach (var service in ChannelDeletedServices)
     {
         await ExecuteAsync((service, e) => service.OnChannelDeleted(e), service, e).ConfigureAwait(false);
     }
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
 private async void ChannelTrackingStatusDeleted(object sender, ChannelDeletedEventArgs e)
 {
     await RemoveChannel(e.ChannelId);
 }
 protected internal virtual ValueTask OnChannelDeleted(ChannelDeletedEventArgs e)
 => default;