discord

package
v0.0.0-...-0d805c2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BotClient

func BotClient() (*discordgo.Session, error)

BotClient creates a Discord client for a bot authenticated using given token. The client is then added to the pool, using the token found in configuration as a key.

func GetUser

func GetUser(ctx context.Context, dc *discordgo.Session) (*models.DiscordUser, error)

GetUser returns Discord user associated with current session.

func ListGuildsOwnedBy

func ListGuildsOwnedBy(ctx context.Context) ([]*models.DiscordUserGuild, error)

ListGuildsOwnedBy lists all guilds owned by currently logged in user.

func UserClient

func UserClient(ctx context.Context) (*discordgo.Session, error)

UserClient returns Discord client authenticated as logged in user associated with to current session. The client is then added to the pool, using session ID as a key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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