twist

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2020 License: MIT Imports: 7 Imported by: 0

README

Joe Bot - Twist Adapter

Connecting joe with the Twist chat application. https://github.com/go-joe/joe


This repository contains a module for the Joe Bot library.

Getting Started

This library is packaged as Go module. You can get it via:

go get github.com/kukuhpro/joe-twist-adapter

Example usage

In order to connect your bot to slack you can simply pass it as module when creating a new bot:

package main

import (
	"os"

	"github.com/go-joe/joe"
	"github.com/kukuhpro/joe-twist-adapter"
)

func main() {
	b := joe.New("example-bot",
		twist.Adapter(),
		…
    )
	
	b.Respond("ping", Pong)

	err := b.Run()
	if err != nil {
		b.Logger.Fatal(err.Error())
	}
}

Contributing

The current implementation is rather minimal and there are many more features that could be implemented on the slack adapter so you are highly encouraged to contribute. If you want to hack on this repository, please read the short CONTRIBUTING.md guide first.

Versioning

We use SemVer for versioning. For the versions available, see the [tags on this repository][tags].

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adapter

func Adapter() joe.Module

Adapter returns a new BotAdapter as joe.Module.

Types

type BotAdapter

type BotAdapter struct {
	// contains filtered or unexported fields
}

func NewBotAdapter

func NewBotAdapter(ctx context.Context, events chan requestCatcher, clientApi clientAPI) (*BotAdapter, error)

func (*BotAdapter) Close

func (b *BotAdapter) Close() error

func (*BotAdapter) RegisterAt

func (b *BotAdapter) RegisterAt(brain *joe.Brain)

func (*BotAdapter) Send

func (b *BotAdapter) Send(text, urlCallback string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL