+Moved guildrole commands to subcommand routine

This commit is contained in:
Alex
2019-06-30 03:20:46 -04:00
parent df7973b3d7
commit 392ba0e19c
73 changed files with 353 additions and 447 deletions
+26
View File
@@ -0,0 +1,26 @@
package commands.general;
import core.Command;
import core.LocStrings;
import dataStructures.*;
import network.NetworkTwitter;
public class CommandTweet extends Command
{
NetworkTwitter tweet = new NetworkTwitter();
public CommandTweet(KittyRole level, KittyRating rating) { super(level, rating); }
@Override
public String getHelpText() { return LocStrings.stub("TweetInfo"); }
@Override
public void onRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
{
//TODO: Figure out how to pass pictures correctly
try {
res.send(tweet.tweet(input.args));
} catch (Exception e) {
res.send(LocStrings.stub("TweetError"));
}
}
}