Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AppConfig

The config file supports JSON5 syntax. It supports both .json and .json5 extensions if you prefer one over the other.

example
{
"token": "k5NzE2NDg1MTIwMjc0ODQ0Nj.DSnXwg.ttNotARealToken5p3WfDoUxhiH",
"commandPrefix": "!mark",
"activity": "\"!mark help\" for help",
"ownerIds": ["00000000000000000"],
"logLevel": "info",
}

Hierarchy

  • AppConfig

Index

Constructors

Properties

activity: string = ...

The activity status shown under the bot's name in the user list

example

"!mark help" for help

default

!mark help

env

ACTIVITY

devGuildId: undefined | string = process.env.DEV_GUILD_ID

This guild ID should be declared if you want its commands to update immediately during development

example

1234567890

env

DEV_GUILD_ID

logLevel: string = ...

Log level in lower case. Can be [silent, error, warn, info, debug, trace]

example

debug

default

info

env

LOG_LEVEL

maxTries: number = ...

The number of tries the sentence generator will try before giving up

example

2000

default

1000

env

MAX_TRIES

messageCommandPrefix: string = ...

The command prefix used to trigger the bot commands (when not using slash commands)

example

!bot

default

!mark

env

MESSAGE_COMMAND_PREFIX

minScore: number = ...

The minimum score required when generating a sentence. A relative "score" based on the number of possible permutations. Higher is "better", but the actual value depends on your corpus.

example

15

default

10

env

MIN_SCORE

ownerIds: string[] = ...

A list of Discord user IDs that have owner permissions for the bot

example

["82684276755136512"]

default

[]

env

OWNER_IDS (comma separated)

slashCommandName: string = ...

The slash command name to generate a message from the bot. (e.g. /mark)

example

message

default

mark

env

SLASH_COMMAND_NAME

stateSize: number = ...

The stateSize is the number of words for each "link" of the generated sentence. 1 will output gibberish sentences without much sense. 2 is a sensible default for most cases. 3 and more can create good sentences if you have a corpus that allows it.

example

3

default

2

env

STATE_SIZE

timezone: string = ...
example

America/Chicago

default

UTC

env

TZ

token: string = ...

Your Discord bot token

example

k5NzE2NDg1MTIwMjc0ODQ0Nj.DSnXwg.ttNotARealToken5p3WfDoUxhiH

env

TOKEN

userRoleIds: string[] = ...

If provided, the standard "generate response" command will only work for a user in this list of role IDs. Moderators and owners configured in ownerIds do not bypass this check, so make sure to add them to a valid role as well.

example

["734548250895319070"]

default

[]

env

USER_ROLE_IDS (comma separated)

Generated using TypeDoc