utils

package
v0.0.0-...-0692ba7 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client *mongo.Client
View Source
var DatabaseName string
View Source
var DefaultStatus = BotStatus{
	Status: "online",
}

Functions

func ConnectDB

func ConnectDB(mongoURI string, dbName string) error

func CreateWelcomeImage

func CreateWelcomeImage(s *discordgo.Session, user *discordgo.User, guildID string)

func GetWelcomeChannel

func GetWelcomeChannel(guildID string) (string, error)

func GetWelcomeMessage

func GetWelcomeMessage(guildID string) (string, error)

func RemoveCountingGame

func RemoveCountingGame(guildID string) error

func RemoveInfiniteStoryChannel

func RemoveInfiniteStoryChannel(guildID string) error

func RemoveWelcomeChannel

func RemoveWelcomeChannel(guildID string) error

func RemoveWelcomeMessage

func RemoveWelcomeMessage(guildID string) error

func SetCountingGame

func SetCountingGame(guildID, channelID string, lastNumber int) error

func SetInfiniteStoryChannel

func SetInfiniteStoryChannel(guildID, messageChannelID, summaryChannelID, summary, messageID string) error

func SetStatus

func SetStatus(s *discordgo.Session) error

func SetWelcomeChannel

func SetWelcomeChannel(guildID, channelID string) error

func SetWelcomeMessage

func SetWelcomeMessage(guildID, message string) error

Types

type BotStatus

type BotStatus struct {
	Status string `bson:"status"`
}

type CountingGame

type CountingGame struct {
	GuildID    string `bson:"guild_id"`
	ChannelID  string `bson:"channel_id"`
	LastNumber int    `bson:"last_number"`
}

func GetCountingGame

func GetCountingGame(guildID string) (CountingGame, error)

type InfiniteStoryChannel

type InfiniteStoryChannel struct {
	GuildID          string `bson:"guild_id"`
	MessageChannelID string `bson:"message_channel_id"`
	SummaryChannelID string `bson:"summary_channel_id"`
	Summary          string `bson:"summary"`
	MessageID        string `bson:"message_id"`
}

func GetInfiniteStoryChannel

func GetInfiniteStoryChannel(guildID string) (InfiniteStoryChannel, error)

type WelcomeChannel

type WelcomeChannel struct {
	GuildID   string `bson:"guild_id"`
	ChannelID string `bson:"channel_id"`
}

Jump to

Keyboard shortcuts

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