예제 #1
0
 private void onMessage(object sender, OnMessageEvent.OnMessageEventArgs args)
 {
     if (args.message.MessageType == MessageType.PRIVMSG && args.message.Content.Trim().StartsWith(Options.prefix))
     {
         foreach (var command in array)
         {
             if (command.name == args.message.Content.Remove(0, 1).Trim())
             {
                 command.Execute();
             }
         }
     }
 }
예제 #2
0
        private void onMessage(object sender, OnMessageEvent.OnMessageEventArgs args)
        {
            switch (args.message.MessageType)
            {
            case MessageType.PRIVMSG:
                Console.WriteLine($"[{args.message.Channel}] {args.message.Author}: {args.message.Content}");
                break;

            case MessageType.LOG:
                //Console.WriteLine(args.message.Raw);
                break;
            }
        }