From 8fbb9bdd0200915d8aee6ee48d6364079c9eb813 Mon Sep 17 00:00:00 2001 From: Anatoly Bazarov Date: Thu, 8 Jun 2023 21:46:59 -0400 Subject: [PATCH] make bot nick configurable --- config.json.example | 1 + index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.json.example b/config.json.example index c93880d..b3cd95d 100644 --- a/config.json.example +++ b/config.json.example @@ -1,4 +1,5 @@ { + "nick": "discordbot", "host": "irc.efnet.org", "port": 6697, "maxNickLength": 16, diff --git a/index.js b/index.js index eb280c3..53622a4 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,7 @@ client.on('ready', () => { channels[channelId] = client.channels.cache.get(channelId); }); - bots[client.user.id] = createBot(client.user.username); + bots[client.user.id] = createBot(config.nick); bots[client.user.id].on('message', function (event) { if(config.excludeNicks.includes(event.nick))