I have this method that basically takes a string and does different things depending on what the string starts with. Is there a cleaner way to write this method?
public String analyze(BotMessage message)
{
String lcmsg = message.message().toLowerCase();
//Not a command
if(!lcmsg.startsWith("!")) return "-1";
//Message from whatever
if(lcmsg.startsWith("!ping")) return "pong!";
if(lcmsg.startsWith("!tournament")) return tournament(message);
//message from skype
if(message.skype())
{
if(lcmsg.startsWith("!settournament")) return settournament(message);
if(lcmsg.startsWith("!promote")) return promote(message);
if(lcmsg.startsWith("!checkin")) return checkin(message);
if(lcmsg.startsWith("!checkout")) return checkout(message);
if(lcmsg.startsWith("!checkedin")) return checkedin(message);
if(lcmsg.startsWith("!updatetournament")) return updatetournament();
}
return "-1";
}