From ce564e2ad9cb8fb5c3b826ad4574f79f341205b6 Mon Sep 17 00:00:00 2001 From: Manuel Date: Mon, 10 May 2021 14:16:10 +0200 Subject: [PATCH] Set activity and set default host --- config.default.json | 1 + index.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config.default.json b/config.default.json index 7514220..a10eec7 100644 --- a/config.default.json +++ b/config.default.json @@ -1,5 +1,6 @@ { "http": { + "host": null, "port": 3002 }, "discord": { diff --git a/index.js b/index.js index 2b04c09..e275a2f 100644 --- a/index.js +++ b/index.js @@ -215,8 +215,8 @@ app.get('/:templateName/', async (req, res) => { } }); -app.listen(config.http.port, () => { - logger.info(`Beebot app listening on port ${config.http.port}!`); +app.listen(config.http.port, config.http.host, () => { + logger.info(`Beebot app listening on ${(config.http.host === null ? 'port ' : config.http.host + ':')}${config.http.port}!`); }); @@ -301,6 +301,12 @@ const otherCommands = { beebot: `Available commands: ${commands}.\nUse \\\\ to flip the template horizontally.${config.discord.public ? "\nInvite link: <" + invitelink + ">" : ""}` }; +client.on('ready', () => { + client.user.setPresence({ + game: { name: 'BBaper' }, + status: 'online' + }); +}); client.on('message', async message => { let commandParsed = /^([/\\])(\w+)\b/.exec(message.cleanContent);