timezonecompanion

package
v2.17.3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CCToZones = map[string][]string{}/* 248 elements not displayed */
View Source
var CountryCodes = map[string]string{}/* 250 elements not displayed */
View Source
var DBSchemas = []string{`
CREATE TABLE IF NOT EXISTS timezone_guild_configs (
	guild_id BIGINT PRIMARY KEY,

	disabled_in_channels BIGINT[],
	enabled_in_channels BIGINT[],

	new_channels_disabled BOOLEAN NOT NULL
);
`, `
ALTER TABLE timezone_guild_configs ADD COLUMN IF NOT EXISTS enabled_in_channels BIGINT[];
`, `
ALTER TABLE timezone_guild_configs ADD COLUMN IF NOT EXISTS new_channels_disabled BOOLEAN NOT NULL DEFAULT FALSE;
`, `
CREATE TABLE IF NOT EXISTS user_timezones(
	user_id BIGINT PRIMARY KEY,
	timezone_name TEXT NOT NULL
);`}

Functions

func FindZone

func FindZone(in string) []string

func GetUserTimezone

func GetUserTimezone(userID int64) *time.Location

func RegisterPlugin

func RegisterPlugin()

func StrZone

func StrZone(zone string) string

Types

type Plugin

type Plugin struct {
	DateParser *when.Parser
}

func (*Plugin) AddCommands

func (p *Plugin) AddCommands()

func (*Plugin) BotInit

func (p *Plugin) BotInit()

func (*Plugin) PluginInfo

func (p *Plugin) PluginInfo() *common.PluginInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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