followers

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package followers implements a plugin which invites specified people to join channels the bot joins. It assumes that servers reply to a succesful join with RPL_CHANNELMODEIS (324). It's not in RFC but it's pretty popular behaviour. Note: it WILL invite the followers if RPL_CHANNELMODEIS is sent because of other event.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Guru

type Guru struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Guru is a structure which holds list of bot's followers. Use Register to create one.

func Register

func Register(b bot.Bot) *Guru

Register creates a Guru (plugin's instance) and registers it with the bot. Use Close to stop the instance.

func (*Guru) Add

func (g *Guru) Add(follower string)

Add causes the bot to send invites to the follower.

func (*Guru) Close

func (g *Guru) Close()

Close stops the Guru from inviting the followers.

func (*Guru) Del

func (g *Guru) Del(follower string)

Del stops the bot from sending invites to the follower.

Jump to

Keyboard shortcuts

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