cheese

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FingersCrossedMessage string = "Looks like <@%s> had their fingers crossed. Too bad!"
	PassErrorMessage      string = "I couldn’t check if the Cheese Touch could be passed to the user above you. Please try again later."
	PassSuccessMessage    string = CheeseEmoji + " <@%s> passed the Cheese touch to <@%s>!"
	StartedMessage        string = ":eyes: :rotating_light: *<@%s>* just touched some terribly moldy cheese, starting the Cheese Touch! To pass it on to someone else, reply with either " +
		PassEmoji1 + " or a " + PassEmoji2 + " under someone who doesn’t have their fingers crossed (a " +
		SafeEmoji + " in their message)."
)

Raw format strings for messages to use with sprintf.

View Source
const (
	CheeseEmoji = ":cheese_wedge:"
	PassEmoji1  = ":point_up:"
	PassEmoji2  = ":point_up_2:"
	SafeEmoji   = ":crossed_fingers:"
)

Variables

This section is empty.

Functions

func GetMessage

func GetMessage(slackClient *slack.Client, channelId string, messageId string) (*slack.GetConversationHistoryResponse, error)

func GetPrecedingMessage

func GetPrecedingMessage(slackClient *slack.Client, channelId string, fromMessageId string) (*slack.GetConversationHistoryResponse, error)

func GiveCheeseTouch

func GiveCheeseTouch(userId string)

func HandleInnerEvent

func HandleInnerEvent(slackClient *slack.Client, innerEvent *slackevents.EventsAPIInnerEvent)

func HasCheese

func HasCheese(message string) bool

func HasCheeseTouch

func HasCheeseTouch(userId string) bool

func HasCheeseTouchStarted

func HasCheeseTouchStarted() bool

func HasFingersCrossed

func HasFingersCrossed(message string) bool

func HasIntentToPass

func HasIntentToPass(message string) bool

func IsPublicChannel

func IsPublicChannel(channelId string) bool

func StartServer

func StartServer(config *Config)

Types

type Config

type Config struct {
	BotToken          string
	Port              int
	RedisURL          string
	VerificationToken string
}

func NewConfig

func NewConfig() *Config

Jump to

Keyboard shortcuts

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