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) |
public WeixiangBot(char characterId)
characterId - The special character for each ChatBot.public java.util.AbstractMap<java.lang.String,java.lang.Integer> createNewCmdsCounter()
public java.lang.String getBotSignature()
getBotSignature 在类中 server.Bots.Botpublic java.lang.String dateCommand()
dateCommand 在类中 server.Bots.Botpublic java.lang.String whoamiCommand(server.User user)
whoamiCommand 在类中 server.Bots.Botuser - the User objectpublic server.Response getResponses(java.lang.String message,
server.User user,
java.util.List<server.ChatClientThread> clients)
server.Bots.BotgetResponses 在类中 server.Bots.Botmessage - the message from useruser - the User objectclients - the list contains the all ChatClientThread who is onlinepublic java.lang.String helpCommand()
helpCommand 在类中 server.Bots.Bot