Hi guys!
After all, bot is made on js.
Well, I’m trying to change a bot’s nickname client that has serverquery privilleges and it’s started by shell.
I’ve already changed all the ways to set up a new username to it’s bot client, but nothing really appears.
As I’m testing before turn bot into a current online server, localhost owns it’s hostname.
The configuration setup is being requested by an .env file with parameters like: hostname, dbURL, pass… Already tried as well to request nickname by this file, but didn’t worked.
I’m importing it’s nickname from a file of constants by import { BOT_NAME } from … and using as nickname: BOT_NAME;
After it, I’ll be pasting some parts of the code for better view:
( INIT.JS ):
const { HOST, QUERY_PORT, PASSWORD, SERVER_PORT, LOGIN_NAME } = process.env;
export default async (props = {}) => {
return new Promise((resolve, reject) => {
const teamspeak = new TeamSpeak({
host: HOST,
username: LOGIN_NAME,
password: PASSWORD,
nickname: BOT_NAME,
protocol: ‘raw’,
queryport: QUERY_PORT,
serverport: SERVER_PORT,
…props,
});
( CONST.JS ):
export const BOT_NAME = ‘bot name here’;
Thank you in advance.