streamer

package
v0.0.0-...-6376c58 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDatesAnnounceable

func CheckDatesAnnounceable(ctx context.Context, service service.Service, guildId, streamerUserId, startedAt string) bool

func CheckIfTwitchStreamerExist

func CheckIfTwitchStreamerExist(ctx context.Context, twitchUsername string, uInfo *models.TwitchUserInfo, s *discordgo.Session, i *discordgo.InteractionCreate, service service.Service) (string, bool)

func CheckLiveStreams

func CheckLiveStreams(s *discordgo.Session, ctx context.Context, service service.Service, guildId string, stop <-chan struct{})

func DeleteServerFromData

func DeleteServerFromData(serverId string) bool

func DeleteStreamerFromData

func DeleteStreamerFromData(serverId, username string) bool

func FormatContent

func FormatContent(str string, sd models.TwitchStreamerData) string

func GetStreamAnnoContent

func GetStreamAnnoContent(ctx context.Context, service service.Service, guildId, streamerUserId string) string

func GetStreamersData

func GetStreamersData(serverId string) map[string]GuildStreamers

func GetTwitchUserInfo

func GetTwitchUserInfo(twitchUsername string, token string) (string, *models.TwitchUserInfo)

func InitStreamersData

func InitStreamersData(ctx context.Context, service service.Service, guildId string)

func SetStreamerData

func SetStreamerData(serverId, twitchUserId, twitchUserName, discordChannelId string)

func SetTwitchStreamer

func SetTwitchStreamer(ctx context.Context, uInfo *models.TwitchUserInfo, channelId, channelName, guildId, creatorUsername string, service service.Service) string

func StartCheckLiveStreams

func StartCheckLiveStreams(s *discordgo.Session, ctx context.Context, service service.Service, guildId string)

func StopCheckLiveStreams

func StopCheckLiveStreams(guildId string)

Types

type GuildStreamers

type GuildStreamers struct {
	StreamUser       string
	DiscordChannelID string
	DiscordServerID  string
}

Jump to

Keyboard shortcuts

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