Documentation ¶
Index ¶
- Variables
- func AddChannelName(channelID, channelName string) error
- func AddWebhook(gid, wi, wt string) error
- func BotIDFromChannelID(s string) (string, error)
- func ChannelIDFromGroupID(s string) (string, error)
- func ChannelNameFromChannelID(s string) (string, error)
- func Parse()
- func SetConfig(c Config)
- func WebhookFromGroupID(s string) (string, string, error)
- type Config
- type Connection
Constants ¶
This section is empty.
Variables ¶
View Source
var Addr string
View Source
var DiscordToken string
View Source
var Discord_Session *discordgo.Session
Functions ¶
func AddChannelName ¶
func AddWebhook ¶
TODO: Lock something during both Add methods to avoid race condition
func BotIDFromChannelID ¶
func ChannelIDFromGroupID ¶
Types ¶
type Config ¶
type Config struct { Address string DiscordBotToken string Connection []Connection }
type Connection ¶
type Connection struct { BotID string `mapstructure:"groupme_bot_id" toml:"groupme_bot_id"` GroupID string `mapstructure:"groupme_group_id" toml:"groupme_group_id"` ChannelID map[string]string `mapstructure:"discord_channels" toml:"discord_channels"` PrimaryChannelID string `mapstructure:"primary_channel" toml:"primary_channel"` WebhookID string `mapstructure:"webhook_id,omitempty" toml:"webhook_id"` WebhookToken string `mapstructure:"webhook_token,omitempty" toml:"webhook_token"` }
Click to show internal directories.
Click to hide internal directories.