elmabot - v0.5.5
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Config
combine
config
db
logger
my
Format
printf
sqlite
timestamp
get
Config
Index
Interfaces
Config
Variables
combine
config
db
logger
my
Format
printf
sqlite
timestamp
Functions
get
Config
Variables
combine
combine
:
combine
Const
config
config
:
Config
= getConfig()
Const
db
db
:
Database
= new sqlite.Database("./config/db.sqlite")
Const
logger
logger
:
Logger
= createLogger({format: combine(timestamp(), myFormat),transports: [new transports.File({ filename: "log/error.log", level: "error" }),new transports.File({ filename: "log/combined.log" }),],})
Const
my
Format
my
Format
:
Format
= printf((info: any) => {return `${info.timestamp} ${info.level}: ${info.message}`;})
printf
printf
:
printf
Const
sqlite
sqlite
:
sqlite3
= sqlite3.verbose()
timestamp
timestamp
:
timestamp
Functions
get
Config
get
Config
(
)
:
Config
simple function to get and parse the TOML config file
Returns
Config
Generated using
TypeDoc
simple function to get and parse the TOML config file