Nikoro is written in Node.js, so you'll need to download and install it together with npm. Take care to install Node.js 6.0 or higher.
Clone the repository to your computer and run the setup wizard:
git clone https://github.com/Telegram-Bot-Node/Nikoro
cd Nikoro
npm run setup:guided
The wizard will ask for the bot token, which you can get from @BotFather, and then take control of the bot.
When you're done, just send /done to quit the wizard, and you're ready to launch the bot:
npm start bot
info: [Bot] Nikoro version 1.0.0, commit 72567d9
info: [Bot] Instance created.
info: [Bot] Plugins loaded.
info: [Bot] The bot is online!
User's guide features many plugins for different use cases, from moderation tools to word games. Here are some highlights:
Nikoro can also be configured via a command line interface, which provides more control and can be faster than the Telegram-based process. The command-line setup can be invoked with:
npm run setup:expert
This will install the dependencies and start the setup interface. The first prompt asks for the bot token, which you can get from @BotFather.
npm run setup:expert > telegram-bot-node@1.0.0 setup:expert /tmp/Nikoro > bash bin/expert-install.sh Checking for Node.js... Node.js found. Checking for npm... npm found. Installing dependencies... added 371 packages in 5.646s Dependencies installed. > Nikoro@1.0.0 configure:expert /tmp/Nikoro > node src/Installer.js ? What's the bot token?
Then, you will select the plugins from a list. You can browse the list with the arrow keys, and select individual plugins with Space.
? What plugins would you like to enable? (Press <space> to select, <a> to toggle all, <i> to inverse selection)
❯◯ The8Ball - Magic 8-Ball!
◯ Antiflood - Automatically ignore or kick spamming users
◯ Auth - Plugin to handle authentication
◯ BoobsButts - Get boobs and butts.
◯ Config - Configuration manager
◯ Echo - Totally not a bot with an echo
◯ Porn - Searches porn.com.
Some plugins may be disabled because they couldn't be initialized:- YouTube.js (Cannot find module 'youtube-api')The most common error is "Cannot find module 'x'", which means that you simply need to open a new terminal, navigate to the bot's directory, and install the module. For example, to use the plugin YouTube.js you would need to run the commands below, and then restart the setup:
cd Nikoro
npm install youtube-api
Then, you will be asked for the list of administrators. The prompt specifically asks for an array of user IDs surrounded by square braces. Getting your user ID can be difficult; you can get it from an existing Nikoro installation using the UserInfo plugin, or by console.log-ging incoming messages in a node-telegram-bot-api instance, or from your profile page in Plus Messenger.
? Enter the list of global admins as an array of user IDs (eg. [1111, 1234])
Finally, you can select the logging level.
? What logging level is to be used?
error
warn
❯ info
verbose
debug
Both setup processes are a graphical frontend to create the configuration file; however, nothing stops you from creating your own. Here are the specifications: