Set activity and set default host

This commit is contained in:
Manuel 2021-05-10 14:16:10 +02:00
parent f7a5d0be29
commit ce564e2ad9
Signed by: Manuel
GPG key ID: 4085037435E1F07A
2 changed files with 9 additions and 2 deletions

View file

@ -1,5 +1,6 @@
{
"http": {
"host": null,
"port": 3002
},
"discord": {

View file

@ -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 \\\\<command> 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);