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);