Created
March 31, 2016 17:42
-
-
Save extendedclip/91d7cc549c4f17d97274de2b920ddd3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.extendedclip.discordbotcommand.help; | |
import sx.blah.discord.handle.obj.IChannel; | |
import sx.blah.discord.handle.obj.IMessage; | |
import sx.blah.discord.util.MessageBuilder.Styles; | |
import com.extendedclip.discordbot.commands.Command; | |
public class Help extends Command { | |
public Help() { | |
super(".help"); | |
} | |
@Override | |
public void execute(IMessage message, String[] args) { | |
IChannel c = message.getChannel(); | |
getDiscordBot().getMessager().msg(c, this.getDiscordBot().getClient().getOurUser().getName() + " help commands", Styles.UNDERLINE_BOLD); | |
getDiscordBot().getMessager().msg(c, "Use @" + getDiscordBot().getClient().getOurUser().getName() + " to chat with me!", Styles.ITALICS); | |
for (Command cmd : getDiscordBot().getCommandHandler().getCommands()) { | |
if (cmd.getHelp() != null) { | |
getDiscordBot().getMessager().msg(c, cmd.getHelp(), Styles.INLINE_CODE); | |
} | |
} | |
} | |
@Override | |
public String getHelp() { | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment