add the prefix to the config
This commit is contained in:
parent
b8db1b7c94
commit
022d624315
2 changed files with 5 additions and 4 deletions
|
@ -7,5 +7,6 @@
|
|||
"auth": "microsoft",
|
||||
"username": "Notch"
|
||||
},
|
||||
"database": "./data.sqlite"
|
||||
"database": "./data.sqlite",
|
||||
"prefix": "!"
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ try {
|
|||
process.exit(1)
|
||||
}
|
||||
|
||||
const db = new sqlite.DatabaseSync(config.database)
|
||||
const db = new sqlite.DatabaseSync(config["database"])
|
||||
migrateDB(db)
|
||||
|
||||
const reconnectDelay = 10_000
|
||||
|
@ -56,7 +56,7 @@ function newClient() {
|
|||
console.log("Client connecting")
|
||||
|
||||
// Client
|
||||
const client = mcProtocol.createClient(config.minecraft)
|
||||
const client = mcProtocol.createClient(config["minecraft"])
|
||||
|
||||
client.addListener("connect", () => {
|
||||
console.log("Client connected")
|
||||
|
@ -91,7 +91,7 @@ function newClient() {
|
|||
new PlayerTracker(client, players, db)
|
||||
|
||||
// Commands
|
||||
const commands = new Commands(chat, "!")
|
||||
const commands = new Commands(chat, config["prefix"])
|
||||
commands.register(new BestPingCommand(chat, players))
|
||||
commands.register(new HelpCommand(chat, commands))
|
||||
commands.register(new InfoCommand(chat))
|
||||
|
|
Loading…
Add table
Reference in a new issue