private static Task GuildDownloadCompleted(
            DSharpPlus.DiscordClient sender,
            DSharpPlus.EventArgs.GuildDownloadCompletedEventArgs e)
        {
            Task.Run(() => ConstructDiscordGuildCollection())
            .ContinueWith((a) => OperationFinished(a));

            return(Task.CompletedTask);
        }
예제 #2
0
 public static async Task Client_GuildDownloadCompleted(DiscordClient sender, DSharpPlus.EventArgs.GuildDownloadCompletedEventArgs e)
 {
     // update user status.. for fun
     var memberCount = e.Guilds.Sum(x => x.Value.MemberCount);
     await sender.UpdateStatusAsync(new DiscordActivity(e.Guilds.Count + " guilds and " + memberCount + " members.", ActivityType.Watching));
 }