You get the api object from login (see example above). You can use api.setOptions to silence the logging. In your case, you would simply need to run the bot, and let it know which IRC server to join (that the server parameter in. I don't want all of these logging messages! An IRC bot is a piece of machine code that has its own logic (Eliza's logic, in your case), and is also connected to IRC and issues IRC commands that let it join channels, talk to other people/bots, received messages, etc. Please try to update your version of node.js before submitting an issue of this nature. I'm getting some crazy weird syntax error like Synta圎rror: Unexpected token [!!! Example Usage const login = require("facebook-chat-api") If you want to test your bots without creating another account on Facebook, you can use Facebook Whitehat Accounts. If you want to use bleeding edge (directly from github) to test new features or submit bug report, this is the command for you: npm install Schmavery/facebook-chat-api Testing your bots It will download facebook-chat-api from NPM repositories Bleeding edge entry point: (index.js) main. If you don’t have Node installed, you can download and install it from Node.js. Here’s what it looks like in chat: Prerequisites. If you just want to use facebook-chat-api, you should use this command: npm install facebook-chat-api npm init package name: (slack-rss) version: (1.0.0) description: A slackbot for rss slash commands. When a user enters dice in the channel’s chat room, the bot randomly generates a number from a six-sided die (1 through 6). See the full changelog for release details. The Feed Reader Bot monitors RSS feeds (and Twitter accounts), and sends messages. Because we're doing it this way, this API won't work with an auth token but requires the credentials of a Facebook account.ĭisclaimer: We are not responsible if your account gets banned for spammy activities such as sending lots of messages to people you don't know, sending messages very quickly, sending spammy looking URLs, logging in and out very quickly. Start using twitch-bot in your project by running npm i twitch-bot. Better yet, I got to create the bot using JavaScript. This means doing the exact same GET/POST requests and tricking Facebook into thinking we're accessing the website normally. Thanks to this awesome NodeJS IRC library and its incredibly easy to use API, I can cross off creating an IRC bot from my WebDev bucket list. This API is the only way to automate chat functionalities on a user account. Facebook now has an official API for chat bots here.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |