neiky-ddracebot.js
v2.4.0
Published
Module for using your bots in game.
Downloads
3
Readme
neiky-ddracebot.js
Exemple:
const DDNet = require('neiky-ddracebot.js');
const { Client } = DDNet;
const config = {
ip_server: '127.0.0.1',
port: 8303,
nickname: 'Bot Username',
};
const client = new Client(`${config.ip_server}`, config.port, config.nickname);
client.on('connection_au_serveur_ddrace', async() => {
const username = await client.avoirUsernameBot();
console.log(`Connection au serveur: \n${config.ip_server}:${config.port}\nAvec le compte ${username}`);
});
client.on('message_au_serveur', message => {
if(message.message == '+skin') {
let username = message.utilisateur.InformationDuBot.name;
let skin = message.utilisateur.InformationDuBot.skin;
return client.game.Say(`${username}: skin: ${skin}`);
};
});
client.joinDDRaceServer();