admin管理员组

文章数量:1379384

i am currently developing a twitch bot and use the tmi.js module in node.js

const tmi = require('tmi.js');

Then i used the code from the documentation like this:

const client = new tmi.Client({
    identity: {
        username: 'twitch_user',
        password: 'twitch_oauth'
    },
    channels: [ 'twitch_channel' ]
});

And finally a test like this:

client.on('message', (ch, tags, message, self) => {
    if (self) return;
    client.say(ch, 'This is a test');
});

It all works, but WebStorm gives me the following message:

Unresolved function or method on()
Unresolved function or method say()

The functions/methods definetly exist and are working. I think the problem here might be how these methods are created in tmi.js and they could be created dynamically.

So, is there a way to tell WebStorm that this exists or something like that?

Thanks!

本文标签: javascriptUnresolved function or method on() and say() in WebStorm with tmijsStack Overflow