Giter VIP home page Giter VIP logo

Comments (15)

thedark1337 avatar thedark1337 commented on September 16, 2024

Make sure the auth token is correct and that you are connecting via the way the readme shows.

from plugapi.

ImGrumpy avatar ImGrumpy commented on September 16, 2024

I've already verified the auth code (as I'm using it with another API just fine) and it is correct. I'll admit that I must have missed something, but your "connecting via the way the readme shows" is just frustrating. I'll post the relative snippets from my code and maybe that will make it easier to see what's wrong:

var PlugAPI = require('plugapi');
var AUTH = 'xxx';  // intentionally blanked
var ROOM = 'yyy';  // intentionally blanked

var bot = new PlugAPI(AUTH);
bot.connect(ROOM);

bot.on('roomJoin', function(data) {
    console.log(data);  // this never happens
});

bot.on('userJoin', function(data) {
    console.log(data);  // this does happen
});

from plugapi.

TATDK avatar TATDK commented on September 16, 2024

If this is still a problem, please tell me what version you are using.

from plugapi.

jbird2093 avatar jbird2093 commented on September 16, 2024

Bare with guys, been since before TAT took over. is there still an update code? i have my auth code taken care of and using my same code, looks like it should fit and i'm connecting just not able to get into a room. UpdateCode the deal?

from plugapi.

avatarkava avatar avatarkava commented on September 16, 2024

updateCode still exists, but the API has decoupled it from the code base by grabbing it from a cloud-hosted location now. Make sure you remove any references from your bot's code.

from plugapi.

jbird2093 avatar jbird2093 commented on September 16, 2024

thatnks for your help. i'm kinda dumb to js but code VB so i can half blind feel my way through. got the update code rmeoved but now i get this and dont understand how to read some of these errors. any idea?

module.js:340
throw err;
^
Error: Cannot find module 'sockjs-client'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (d:\bots\node_modules\plugapi\bin\client.js:23:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

from plugapi.

jbird2093 avatar jbird2093 commented on September 16, 2024

btw i've caught up on these issue logs so i'm not just playing dumb. lol

from plugapi.

avatarkava avatar avatarkava commented on September 16, 2024

Looks like you're probably missing some dependencies ... have you run npm or a similar client to grab all the packages?

from plugapi.

jbird2093 avatar jbird2093 commented on September 16, 2024

i would agree. i'm not sure if i might have some residue lefotver form the lst but i did my npm install plugapi --production, i have a npm install receipts that i've always had to do. i simply did a copy as a zip file from the git and just unpacked it after. maybe an order of operations thing??? could you help me with those initial steps to get those dependencies?
gawd my typos are rampant today. i guess thats the excitement of not having to work and in between jobs. lets say i have some spare time on my hands. lol

from plugapi.

jbird2093 avatar jbird2093 commented on September 16, 2024

sshit. might not have mySql installed on this home pc. have to work from my bot server as i've cleaned up my home pc a bit. that error doesnt appear to be the mysql issue though. i know that one when i see it.
-JBIRD420

from plugapi.

avatarkava avatar avatarkava commented on September 16, 2024

Okay, the way you're calling npm there is installing a specific package (in this case, plugapi which should fail since you have it already). The simplest way to do this is to go into your node_modules/plugapi/ directory and run npm install there, which should pull down all the prereqs for you. The --production flag shouldn't make a difference in this case, to my knowledge, since there are no dev requirements in package.json.

from plugapi.

jbird2093 avatar jbird2093 commented on September 16, 2024

oh shiznit! well that gets my loving AuntJackie into the room. i think the remaining would be in my code somewhere. lol now the hard part to find out the gaps in between. TY TY TY very much!

from plugapi.

jbird2093 avatar jbird2093 commented on September 16, 2024

well i'm dumb enough to be confused. using my old code i used to get my bot to speak with this below. i dont know how to find out the current functions i guess in this api and error out with this. any ideas or able to point my dumb ass in the right direction? lol

    speak: function (arg) {
        bot.speak(arg);
        console.log(arg)
    },

from plugapi.

avatarkava avatar avatarkava commented on September 16, 2024

It's sendChat() now. A lot of functions were also renamed to be consistent throughout the code.

Check the wiki here - it documents pretty well: https://github.com/TATDK/plugapi/wiki

from plugapi.

jbird2093 avatar jbird2093 commented on September 16, 2024

oh nice! i managed to figure that out by lookin in the client.js file. YAAAY! i'm a happy SOB right now. dumb enough to be able to figure out where to hunt. lol

from plugapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.