Examples of EChatEntryType


Examples of uk.co.thomasc.steamkit.base.generated.steamlanguage.EChatEntryType

    msg.handle(ChatMsgCallback.class, new ActionT<ChatMsgCallback>() {
      @Override
      public void call(ChatMsgCallback callback) {
        //Type (emote or chat)
        final EChatEntryType type = callback.getChatMsgType();

        if (type == EChatEntryType.ChatMsg) {
          String response = "";
          if (responses.containsKey(callback.getMessage().toLowerCase())) {
            response = responses.get(callback.getMessage().toLowerCase());
          } else {
            final String[] args = callback.getMessage().split(" ");
            final String text = Util.removeArg0(callback.getMessage());
            final String[] pArgs = text.split(" ");

            Command cmd = Commands.getCommand(args[0]);
            if (cmd != Commands.unknown) {
              response = cmd.call(Bot.this, callback.getChatterID(), pArgs, text);
            }
          }
          steamFriends.sendChatRoomMessage(callback.getChatRoomID(), EChatEntryType.ChatMsg, response);
        }
      }
    });
   
    msg.handle(FriendMsgCallback.class, new ActionT<FriendMsgCallback>() {
      @Override
      public void call(FriendMsgCallback callback) {
        //Type (emote or chat)
        final EChatEntryType type = callback.getEntryType();

        if (type == EChatEntryType.ChatMsg) {
          String response = "";
          if (responses.containsKey(callback.getMessage().toLowerCase())) {
            response = responses.get(callback.getMessage().toLowerCase());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.