示例#1
0
 private static async Task MessageRecieved(SocketMessage message)
 {
     Task.Run(async() => {
         var userSocketMessage = message as SocketUserMessage;
         try {
             if (userSocketMessage != null && userSocketMessage.Id != 598740888562302977)
             {
                 await CustomEmoji.Handle(userSocketMessage);
                 await Dubs.Handle(userSocketMessage);
                 await new Capitalism().Handle(userSocketMessage);
             }
         } catch (Exception exception) {
             Console.WriteLine(exception);
             Console.WriteLine(exception.StackTrace);
         }
     });
 }
示例#2
0
 private static Task ReactionAdded(Cacheable <IUserMessage, ulong> message, ISocketMessageChannel channel, SocketReaction reaction)
 {
     Purge.Added(message.Id, reaction);
     Dubs.Added(message.Id, reaction);
     return(Task.CompletedTask);
 }