discord1111resolver

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2018 License: MIT Imports: 8 Imported by: 1

Documentation

Overview

Package discord1111resolver contains the main DNS discordgo handler functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResolveHandler

type ResolveHandler struct {
	// DiscordBotUser contains information about the Discord bot user resolved via:
	//
	//  var session *discordgo.Session
	//	// assign session
	//	user, err := session.User("@me")
	//
	// This allows the handler to correctly react to tags in order to fulfill its function as a DNS resolver.
	DiscordBotUser *discordgo.User
	// DNSClient is an instance of the miekg dns client.
	DNSClient *dns.Client
	// contains filtered or unexported fields
}

ResolveHandler is used to handle DNS query requests by Discord users. Its Handle method should be bound to a discordgo session instance.

func (*ResolveHandler) Handle

func (resolveHandler *ResolveHandler) Handle(session *discordgo.Session, messageCreate *discordgo.MessageCreate)

Handle handles triggered events of created messages.

func (*ResolveHandler) Initialize

func (resolveHandler *ResolveHandler) Initialize()

Initialize sets basic internal values of the ResolveHandler instance and has to be called before binding the Handle function.

Jump to

Keyboard shortcuts

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