Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &discordac.AppliedCommand{ Specification: &discordgo.ApplicationCommand{ Name: "wikipedia", Description: "Search wikipedia", Type: discordgo.ChatApplicationCommand, Options: []*discordgo.ApplicationCommandOption{ { Type: discordgo.ApplicationCommandOptionString, Name: "query", Description: "What to search", Required: true, }, }, }, Handler: func(cc *discordac.CommandContext) { if query, ok := cc.GetOption("query"); ok { cc.Respond("Searching...") go findWikipedia(query.StringValue(), cc) } }, }
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { XMLName xml.Name `xml:"api"` Text string `xml:",chardata"` Batchcomplete string `xml:"batchcomplete,attr"` Query struct { Text string `xml:",chardata"` Redirects struct { Text string `xml:",chardata"` R struct { Text string `xml:",chardata"` From string `xml:"from,attr"` To string `xml:"to,attr"` } `xml:"r"` } `xml:"redirects"` Pages struct { Text string `xml:",chardata"` Page struct { Text string `xml:",chardata"` Idx string `xml:"_idx,attr"` Pageid string `xml:"pageid,attr"` Ns string `xml:"ns,attr"` Title string `xml:"title,attr"` Extract struct { Text string `xml:",chardata"` Space string `xml:"space,attr"` } `xml:"extract"` } `xml:"page"` } `xml:"pages"` } `xml:"query"` }
Click to show internal directories.
Click to hide internal directories.