server.Bots

## 类 WeixiangBot

- java.lang.Object
- - server.Bots.Bot
  - - server.Bots.WeixiangBot

    public class WeixiangBot
    extends server.Bots.Bot

### 构造器概要

构造器
构造器和说明
`WeixiangBot(char characterId)` This is constructor that add all the responses to the map.

### 方法概要

所有方法 实例方法 具体方法
`java.util.AbstractMap<java.lang.String,java.lang.Integer>` `createNewCmdsCounter()` This method is to construct a hashmap to count amount of how many times the command being called
`java.lang.String` `dateCommand()` This method is to get the date and return it
`java.lang.String` `getBotSignature()`
`server.Response` `getResponses(java.lang.String message, server.User user, java.util.List<server.ChatClientThread> clients)` Every Bot's subclass needs to overwrite this method.
`java.lang.String` `helpCommand()`
`java.lang.String` `whoamiCommand(server.User user)`

### 从类继承的方法 server.Bots.Bot

`getBotCharacterId, getDefaultCommandsList, getSmartResponse, infoCommand, setBotCharacterId`

### 从类继承的方法 java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 构造器详细资料

#### WeixiangBot

    public WeixiangBot(char characterId)

This is constructor that add all the responses to the map.

参数:
  `characterId` - The special character for each ChatBot.

### 方法详细资料

#### createNewCmdsCounter

    public java.util.AbstractMap<java.lang.String,java.lang.Integer> createNewCmdsCounter()

This method is to construct a hashmap to count amount of how many times the command being called

返回:
  A HashMap to count each commands that have been used

#### getBotSignature

    public java.lang.String getBotSignature()

指定者:
  `getBotSignature` 在类中 `server.Bots.Bot`
返回:
  the string representing the signature of the ChatBot

#### dateCommand

    public java.lang.String dateCommand()

This method is to get the date and return it

指定者:
  `dateCommand` 在类中 `server.Bots.Bot`
返回:
  the string representing the date

#### whoamiCommand

    public java.lang.String whoamiCommand(server.User user)

指定者:
  `whoamiCommand` 在类中 `server.Bots.Bot`
参数:
  `user` - the User object
返回:
  the string that has a name and IP address

#### getResponses

    public server.Response getResponses(java.lang.String message,
                                        server.User user,
                                        java.util.List<server.ChatClientThread> clients)

从类复制的说明: `server.Bots.Bot`
Every Bot's subclass needs to overwrite this method.

指定者:
  `getResponses` 在类中 `server.Bots.Bot`
参数:
  `message` - the message from user
  `user` - the User object
  `clients` - the list contains the all ChatClientThread who is online
返回:
  A Response that has two fields, one is the response message, the other is the URL if needed

#### helpCommand

    public java.lang.String helpCommand()

覆盖:
  `helpCommand` 在类中 `server.Bots.Bot`
返回:
  The string listing out all available commands