use of net.kodehawa.mantarobot.utils.data.SimpleFileDataManager in project MantaroBot by Mantaro.
the class InfoCmds method tips.
@Subscribe
public void tips(CommandRegistry cr) {
final List<String> tips = new SimpleFileDataManager("assets/mantaro/texts/tips.txt").get();
final Random r = new Random();
cr.register("tips", new SimpleCommand(Category.INFO) {
@Override
protected void call(GuildMessageReceivedEvent event, String content, String[] args) {
event.getChannel().sendMessage(EmoteReference.TALKING + "Tip: " + tips.get(r.nextInt(tips.size()))).queue();
}
@Override
public MessageEmbed help(GuildMessageReceivedEvent event) {
return helpEmbed(event, "Tips Command").setDescription("**Shows tips about the bot!**").build();
}
});
cr.registerAlias("tips", "bottips");
}
Aggregations