Skip to content

Add a config system for bot customization. #7

Description

@Owen3H

Since this bot can be self-hosted, it should have some sort of config file system (TOML?) where users can edit options the bot will use instead of being hardcoded. This way, the user doesn't have update their fork or change code to receive/make these changes themselves.

Here is a small example:

BOT_NAME = "EMCS Rewritten"
PAGINATOR_TIMEOUT = 120 # The amount of time (sec) before a paginator will stop responding to buttons.
MESSAGE_DELETE = 10     # The amount of time (sec) before a message is deleted (usually in error cases).

[OAPI]
DOMAIN = "https://api.earthmc.net/v3/"
RATE_LIMIT = 180  # The amount of requests that can be sent in a minute.
QUERY_LIMIT = 100 # The amount of items each request query can contain.

[CACHE]
  [CACHE.MAPI]
    MARKERS = 60 # How often town/nation data should be cached in seconds.
    PLAYERS = 3  # How often online player data should be cached in seconds. Does not include underground players.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions