mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-21 00:28:23 +08:00
23 lines
388 B
TypeScript
23 lines
388 B
TypeScript
import {Client} from './index';
|
|
|
|
let client = new Client({
|
|
jid: 'user@example.com',
|
|
password: 'password'
|
|
});
|
|
|
|
client.connect();
|
|
|
|
client.on('online', function () {
|
|
});
|
|
|
|
client.on('stanza', function (stanza) {
|
|
let _ = stanza;
|
|
});
|
|
|
|
let stanza = new Client.Stanza('chat', {})
|
|
.c('show').t('chat').up()
|
|
.c('status').t('message');
|
|
client.send(stanza);
|
|
|
|
client.disconnect();
|