bot

package
v0.0.0-...-989d8f1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: CC0-1.0 Imports: 12 Imported by: 0

Documentation

Overview

Package bot provides an interface accessing the tock and slack apis The primary purpose of this packages is to collect users from tock who have not filled out thier time forms and use the slack api to message them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	UserEmailMap *safeDict.SafeDict
	Slack        *slackPackage.Slack
	Tock         *tockPackage.Tock
	MessageRepo  *messagesPackage.MessageRepository
	// contains filtered or unexported fields
}

Bot struct serves as the primary entry point for slack and tock api methods It stores the slack token string and a database connection for storing emails and usernames

func InitBot

func InitBot() *Bot

InitBot method initalizes a bot

func (*Bot) ListenToSlackUsers

func (bot *Bot) ListenToSlackUsers()

ListenToSlackUsers starts a loop that listens to tock users

func (*Bot) RemindUsers

func (bot *Bot) RemindUsers(message string)

RemindUsers collects users from tock and looks for thier slack ids in a database

func (*Bot) SlapLateUsers

func (bot *Bot) SlapLateUsers()

SlapLateUsers collects users from tock and looks for thier slack ids in a database

func (*Bot) StoreSlackUsers

func (bot *Bot) StoreSlackUsers()

StoreSlackUsers is a method for collecting and storing slack users in database

Jump to

Keyboard shortcuts

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