Download the PHP package portlandlabs/slackbot without Composer

On this page you can find all versions of the php package portlandlabs/slackbot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package slackbot

Slackbot

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

This SlackBot is a fully featured slack bot in the style of old IRC bots with the power of new fancy bots. You can react to arbitrary messages like tracking emojis in a message like "Giving some :heart: to @user", or build simple call and response style messages like @bot dosomething

Getting Started

Setup

First configure your slackbot by copying .env.dist to .env and configuring the required details

Running the bot

The Slackbot is powered by a single PHP script, run it to get started:

Permissions and Roles

Slackbot actions are managed by roles. The available roles are Bot, User, and Admin

Role Extends How to Access
User - Don't be a bot
Admin User Use the bot in the configured Admin channel
Bot - Send a message through the Slack Web API with as_user disabled

Commands

Commands are triggered by events flowing through the RTM API. Any event with the type message will flow through the command stack.

A basic command defines ->shouldHandle(Message $message) and ->handle(Message $message), but SimpleCommand makes things a little easier to implement. Commands that extend SimpleCommand work much the same as console commands. Declare your $signature property and a run(Message $message, ArgumentManager $manager) method, and the super class will manage hooking everything up.

Adding commands to the bot

You can add commands to the bot through the bot's command manager:

Adding Default Commands:
We've wrapped the default commands in a simple provider:

Sending messages to slack

There are a few ways to send messages to slack from a command:

  1. RTM API with Typing indicator

    When using the RTM API you have the ability to trigger typing indicators (so that slack says the bot is typing)

    The result of this method is a Promise that resolves when Slack acknowledges the sent message.

  2. RTM API without typing

    If you don't want the (creepy) typing indicator and you want to be upfront with the fact that your bot doesn't type,

    The result of this is also a Promise

  3. Web API with ability to Update

    The Web API uses HTTP to send messages to slack and so can be a bit slower than using the RTM API with the added benefit of a ton of added power.

    Simple Usage:
    The simplest usage is with the Payload Builder:

    Complex Usage:
    If you're looking for more power or for different endpoints, you can simply build payloads directly and send them with the API


All versions of slackbot with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
ext-json Version *
ext-pcntl Version *
textalk/websocket Version ^1.2
cleentfaar/slack Version ^0.20.1
vlucas/phpdotenv Version ^2.4
buttress/collecterator Version ^1.0
league/climate Version ^3.2
illuminate/config Version ^5.4
guzzlehttp/guzzle Version ^6.3
react/promise Version ^2.5
cache/filesystem-adapter Version ^1.0
nunomaduro/collision Version ^2.0
ratchet/pawl Version ^0.3.1
illuminate/container Version ^5.7
clue/arguments Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package portlandlabs/slackbot contains the following files

Loading the files please wait ....