actually make creator configurable instead of hardcoding
This commit is contained in:
parent
c057037154
commit
592cbe2b0d
4 changed files with 10 additions and 2 deletions
|
@ -21,6 +21,9 @@ public class Configuration {
|
|||
|
||||
@Getter public Core core = new Core();
|
||||
@Getter public Discord discord = new Discord();
|
||||
|
||||
@Getter public String ownerName = "chayapak"; // mabe mabe
|
||||
|
||||
@Getter public List<String> trusted = new ArrayList<>();
|
||||
@Getter public SelfCare selfCare = new SelfCare();
|
||||
@Getter public Bots[] bots = new Bots[]{};
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package land.chipmunk.chayapak.chomens_bot.commands;
|
||||
|
||||
import land.chipmunk.chayapak.chomens_bot.Bot;
|
||||
import land.chipmunk.chayapak.chomens_bot.command.Command;
|
||||
import land.chipmunk.chayapak.chomens_bot.command.CommandContext;
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
@ -34,11 +35,13 @@ public class CreatorCommand implements Command {
|
|||
}
|
||||
|
||||
public Component execute(CommandContext context, String[] args, String[] fullArgs) {
|
||||
final Bot bot = context.bot();
|
||||
|
||||
context.sendOutput(
|
||||
Component.empty()
|
||||
.append(Component.text("ChomeNS Bot ").color(NamedTextColor.YELLOW))
|
||||
.append(Component.text("was created by ").color(NamedTextColor.WHITE))
|
||||
.append(Component.text("chayapak").color(NamedTextColor.GREEN))
|
||||
.append(Component.text(bot.config().ownerName()).color(NamedTextColor.GREEN))
|
||||
);
|
||||
|
||||
return Component.text("success");
|
||||
|
|
|
@ -108,7 +108,7 @@ public class ConsolePlugin {
|
|||
Component.translatable(
|
||||
"[%s] %s › %s",
|
||||
Component.text(bot.username() + " Console").color(NamedTextColor.GRAY),
|
||||
Component.text("chayapak").color(NamedTextColor.GREEN),
|
||||
Component.text(bot.config().ownerName()).color(NamedTextColor.GREEN),
|
||||
Component.text(line).color(NamedTextColor.GRAY)
|
||||
).color(NamedTextColor.DARK_GRAY)
|
||||
);
|
||||
|
|
|
@ -17,6 +17,8 @@ discord:
|
|||
servers:
|
||||
localhost:25565: 'channel id'
|
||||
|
||||
ownerName: 'chayapak' # currently this is only used in the creator command and the console
|
||||
|
||||
trusted:
|
||||
- 'player name'
|
||||
|
||||
|
|
Loading…
Reference in a new issue