Skip to content

Setting Up Your Bot

pumbas600 edited this page Dec 24, 2021 · 7 revisions

Bots created using Halpbot-Core require 2 things:

  1. A bot-config.properties file in your resources folder, which allows you to easily configure your bot
  2. A class extending the Bot interface, which is used to bootstrap your bot

bot-config.properties

This property file allows you to configure different aspects of Halpbot. Depending on which adapters your bot is using, different properties may be required.

Note: If your config file is not named bot-config.properties and not located at resources/bot-config.properties it won't be found by Halpbot

These properties are summarised below:

displayConfiguration

  • default value: nz.pumbas.halpbot.configurations.SimpleDisplayConfiguration
  • used by: HalpbotCore

A fully qualified class name for the DisplayConfiguration to be used by Halpbot and is used to display messages. Along with the default SimpleDisplayConfiguration (which just displays objects directly) there is also nz.pumbas.halpbot.configurations.EmbedStringsDisplayConfiguration, which displays any strings as a MessageEmbed.

You can use your own custom DisplayConfiguration by specifying a class that implements the DisplayConfiguration interface.

Clone this wiki locally