added ability to define aliases in the code

This commit is contained in:
Sheldan
2020-04-04 17:29:49 +02:00
parent 20b282584a
commit a957c66905
4 changed files with 18 additions and 2 deletions

View File

@@ -34,9 +34,11 @@ public class AddToChannelGroup implements Command {
Parameter channelGroupName = Parameter.builder().name("name").type(String.class).description("The name of the channel group to add the channel to.").build();
Parameter channelToAdd = Parameter.builder().name("channel").type(TextChannel.class).description("The mention of the channel to add to the group.").build();
List<Parameter> parameters = Arrays.asList(channelGroupName, channelToAdd);
List<String> aliases = Arrays.asList("addTChGrp", "chGrpCh+");
return CommandConfiguration.builder()
.name("addToChannelGroup")
.module("channels")
.aliases(aliases)
.parameters(parameters)
.description("Adds the mentioned channel to the channel group.")
.causesReaction(true)

View File

@@ -34,9 +34,11 @@ public class RemoveFromChannelGroup implements Command {
Parameter channelGroupName = Parameter.builder().name("name").type(String.class).description("The name of the channel group to remove the channel from.").build();
Parameter channelToAdd = Parameter.builder().name("channel").type(TextChannel.class).description("The mention of the channel to remove from the group.").build();
List<Parameter> parameters = Arrays.asList(channelGroupName, channelToAdd);
List<String> aliases = Arrays.asList("rmChChgrp", "chGrpCh-");
return CommandConfiguration.builder()
.name("removeFromChannelGroup")
.module("channels")
.aliases(aliases)
.parameters(parameters)
.description("Removes the mentioned channel from the channel group.")
.causesReaction(true)