how

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 11 Imported by: 0

README

Gadget Plugin for How Questions

This is a Gadget plugin to allow asking "How do I...?" type questions.

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(how.GetMentionRoutes()). This usually looks like this:

package main

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

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

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

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

What can this plugin do?

In your chat, you can perform the following actions:

  • how do I ...? - Looks up a short answer to your question using wikihow.
    • Parameters: ... above is any question you might want to ask, such as how do 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

Types

This section is empty.

Jump to

Keyboard shortcuts

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