Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const BeamClient = require('beam-client-node');
- const BeamSocket = require('beam-client-node/lib/ws');
- const ChannelName = "Magnamura";
- const client = new BeamClient();
- client.use(_Username, _Password {
- username: _Username,
- password: _Password,
- })
- .attempt().then(function)(){
- .request('GET', 'channels/'+ChannelName).then(res => {
- const ChannelID = res.body.id;
- })
- }
- .then(function () {
- return client.chat.join(ChannelID);
- })
- .then(function (res) {
- console.log('join chat response:', res);
- })
- .catch(function (err) {
- console.log('error joining chat:', err);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement