const DestinyGGClient = require('destiny.gg-chat')
const client = new DestinyGGClient({
url: 'wss://chat.destiny.gg/ws',
reconnect: true,
timeout: 20000,
authtoken: 'PUT_AUTHTOKEN_HERE',
sid: '' // Session id (alternative to authtoken)
})
client.on('open', function() {
client.message('Hello world!')
})
client.on('message', function(nick, msg, features) {
client.message(`${nick} you said ${msg}`)
})
client.on('error', function(reason) {
if (reason === 'banned') {
console.log('I was banned :(')
} else if (reason === 'muted') {
client.close()
}
})
client.on('close', function() {
console.log('This is false:', this.connected)
})-
Notifications
You must be signed in to change notification settings - Fork 0
TotallyMehis/destiny.gg-chat-js
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published