fixed time
This commit is contained in:
parent
a32efd38b4
commit
3b69c3e80f
|
@ -1,9 +1,13 @@
|
||||||
import { cfg, read } from './inc/cfg.js';
|
import { cfg, read } from './inc/cfg.js';
|
||||||
import { wrapper } from './inc/wrapper.js';
|
import { wrapper, clients } from './inc/wrapper.js';
|
||||||
|
|
||||||
read().then(() => {
|
read().then(() => {
|
||||||
let bot = new wrapper();
|
let bot = new wrapper();
|
||||||
bot.on('message', e => {
|
bot.on('message', e => {
|
||||||
console.log( e );
|
//if(e.type === "tg")
|
||||||
|
// clients[0].client.send(`PRIVMSG #kbot-dev ${e.user.nick}: ${e.message}`);
|
||||||
|
|
||||||
|
console.log(e.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
|
@ -90,7 +90,7 @@ class irc {
|
||||||
channel: tmp.params[0],
|
channel: tmp.params[0],
|
||||||
user: user,
|
user: user,
|
||||||
message: tmp.params[1].replace(/\r?\n|\r/g, ''),
|
message: tmp.params[1].replace(/\r?\n|\r/g, ''),
|
||||||
time: Date.now(),
|
time: ~~(Date.now() / 1000),
|
||||||
reply: msg => {
|
reply: msg => {
|
||||||
this.send(`PRIVMSG ${tmp.params[0]} ${msg}`);
|
this.send(`PRIVMSG ${tmp.params[0]} ${msg}`);
|
||||||
},
|
},
|
||||||
|
|
|
@ -64,4 +64,4 @@ const replytg = (bot, tmp) => { // muss noch hier raus
|
||||||
};
|
};
|
||||||
|
|
||||||
util.inherits(wrapper, EventEmitter);
|
util.inherits(wrapper, EventEmitter);
|
||||||
export default { wrapper };
|
export default { wrapper, clients };
|
Loading…
Reference in New Issue
Block a user