dev-master
9999999-devTemplate for yabot projects.
MIT
The Requires
- nopolabs/yabot dev-master
- php >=7.0
The Development Requires
Template for yabot projects.
Project template for building a slack bot using nopolabs/yabot, (*1)
You will need php 7.* and composer., (*2)
composer create-project --stability dev nopolabs/yabot-template my-bot # allow composer to remove existing .git history cd my-bot # create your own git repository for your bot cp config.example.php config.php cp .env.example .env vi .env # replace SLACK-TOKEN-GOES-HERE with your slack token php yabot.php # ... profit
NOTE: yabot uses nopolabs repositories for slack-client and phpws because it depends on updates to coderstephen/slack-client and devristo/phpws that are not yet available from those packages., (*3)
Visit yabot-plugins to find a number of example plugins of varying complexity and utility. Here is how to add one of those plugins (GiphyPlugin) to this project., (*4)
composer require nopolabs/yabot-plugins vi config/plugins.yml # add: "- { resource: '../vendor/nopolabs/yabot-plugins/config/plugin.giphy.yml' }" to the imports section. php yabot.php
yabot-template contains one plugin (HelloPlugin) as a placeholder to show where plugin source code, tests, and configuration go. Specifically:, (*5)
Yabot uses monolog to write logs. By default logging is configured in config.php to go to logs/bot.log., (*6)
Setting 'log.file' => 'php://stdout'
can be useful during development to
direct logging information to the terminal where you have started yabot., (*7)
Template for yabot projects.
MIT