org.elite.jdcbot.util
Class StaticCommands
java.lang.Object
org.elite.jdcbot.util.MySQLWork
org.elite.jdcbot.util.StaticCommands
public class StaticCommands
- extends MySQLWork
Simple MySQLWork extended class that gets static command (command with static output)
from MySQL database. For creating this table, find command.sql in downloaded framework and
run it. Also, you should change name of database, username and password in constructor
- Since:
- 0.6
- Version:
- 0.7
- Author:
- Kokanovic Branko, AppleGrew
Field Summary |
protected java.util.HashMap<java.lang.String,java.lang.String> |
cmds
|
Method Summary |
java.lang.String |
parseCommand(java.lang.String cmd)
Tries to get command output from database |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cmds
protected java.util.HashMap<java.lang.String,java.lang.String> cmds
StaticCommands
public StaticCommands()
parseCommand
public java.lang.String parseCommand(java.lang.String cmd)
- Tries to get command output from database
- Parameters:
cmd
- Command that was on main chat for which we search output (e.g. +help)
- Returns:
- Empty string ("") if command was not found in database, command output otherwise
(e.g. "Output some help")