eightball

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 4 Imported by: 0

README

Gadget Plugin to add a Magic Eightball

This is a Gadget plugin to allow shaking a magic eightball.

Note that Gadget -- and therefore any plugin for Gadget -- is still very much a work in progress, so please don't use it in production yet (or if you do, don't complain).

How do I use this plugin?

In your main.go for using Gadget, your main() function should instruct you bot, which is created using gadget.Setup() needs to be instructed to Router.AddMentionRoutes(eightball.GetMentionRoutes()). This usually looks like this:

package main

import (
	gadget "github.com/gadget-bot/gadget/core"
	eightball "github.com/gadget-bot/gadget-plugin-eightball"
)

func main() {
	// This is the Gadget bot
	myBot := gadget.Setup()

	// Add your custom plugins here
	myBot.Router.AddMentionRoutes(eightball.GetMentionRoutes())

	// This launches your bot
	myBot.Run()
}

What can this plugin do?

In your chat, you can perform the following actions:

  • Will I ... ? - Asks the magic eightball a question.
    • Aliases: Can I ... ?, Am I ... ?
    • Parameters: ... above is any question you might want to ask, such as Will I get rich? where ... is replaced with get rich.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMentionRoutes

func GetMentionRoutes() []router.MentionRoute

This function is used to retrieve all Mention Routes from this plugin

Types

This section is empty.

Jump to

Keyboard shortcuts

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