types

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HelperConfig

type HelperConfig struct {
	HelperType       string `yaml:"helper_type"`
	AlarmURL         string `yaml:"alarm_url"`
	ExtraHeader      string `yaml:"extra_header"`
	ExtraHeaderValue string `yaml:"extra_header_value"`
}

HelperConfig this struct contains the information to configure the helper used by the bot

type TelegramBotConfig

type TelegramBotConfig struct {
	BotToken     string `yaml:"bot_token"`
	AllowedUsers []int  `yaml:"allowed_users"`
}

TelegramBotConfig configuration for the telegram bot

func (*TelegramBotConfig) CanAccessBot

func (botConfig *TelegramBotConfig) CanAccessBot(b *tb.Bot, sender *tb.User) bool

CanAccessBot checks and returns if the user is allowed to access the bot and sends a notification if the user isn't allowed

Jump to

Keyboard shortcuts

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