Skip to content

Commit

Permalink
Added:
Browse files Browse the repository at this point in the history
    Alias emote -> emoji

Updated:
    Help now links to help website
    Info commands has more info and now links to websites
    Invite command uses the invite URL on gudenau.net
    Now on version 1.0.2
  • Loading branch information
gudenau committed Apr 24, 2020
1 parent 9fdd581 commit a47a615
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @since 1.0.0
* */
public class DiscordImages{
public static final String BOT_VERSION = "1.0.1";
public static final String BOT_VERSION = "1.0.2";

public static void main(String[] arguments){
Natives.loadNatives();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private void registerCommands(){
new UpdateAvatarCommand()
);

register(new MessageCommand("invite", "Get's the URL to invite this bot!", "Thanks for the interest!\nhttps://discordapp.com/oauth2/authorize?client_id=532402004568440852&scope=bot&permissions=-1"));
register(new MessageCommand("invite", "Get's the URL to invite this bot!", "Thanks for the interest!\nhttps://invite.imagebot.gudenau.net/"));

register(new AvatarCommand());
register(new GuildCommand());
Expand Down Expand Up @@ -230,6 +230,7 @@ private void registerCommands(){
* */
private void registerAliases(){
registerAlias("e", "emoji");
registerAlias("emote", "emoji");
registerAlias("a", "avatar");
registerAlias("g", "guild");
registerAlias("i", "info");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,7 @@ public Result execute(@Nonnull TextChannel channel, @Nonnull Member author, @Non
return Result.help(this);
}
if(arguments.isEmpty()){
List<IMessageCommand> commands = new ArrayList<>(commandMap.values());
commands.sort(Comparator.comparing(IMessageCommand::getName));

var builder = new StringBuilder("Commands:");
for(IMessageCommand command : commands){
if(command.isAvailable(channel, author)){
builder.append("\n**").append(command.getName()).append("**\n > ").append(command.getHelp());
}
}
return Result.success(builder.toString());
return Result.success("For a complete listing of commands see https://help.imagebot.gudenau.net/");
}else{
var commandName = arguments.get(0);
var command = commandManager.getCommand(commandName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public Result execute(@Nonnull TextChannel channel, @Nonnull Member author, @Non
return Result.success(
"Created by gudenau\n" +
"Issues: https://github.com/gudenau/discord-ImageBot/issues\n" +
"Help: https://todo\n" +
"Help: https://help.imagebot.gudenau.net/\n" +
"Source: https://imagebot.gudenau.net/\n" +
"Invite: https://invite.imagebot.gudenau.net/\n" +
"Version: " + DiscordImages.BOT_VERSION
);
}
Expand Down

0 comments on commit a47a615

Please sign in to comment.