discord

package
v0.0.4-beta Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

discordprofile.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotConfig

type BotConfig struct {
	Token string
}

BotConfig holds the configuration details for the Discord bot

func LoadConfig

func LoadConfig() *BotConfig

LoadConfig reads configuration from environment variables or a .env file

type UserProfile

type UserProfile struct {
	ID            string `json:"id"`
	Username      string `json:"username"`
	Discriminator string `json:"discriminator"`
	Avatar        string `json:"avatar"`
}

UserProfile holds the structure for a Discord user profile response

func GetUserProfile

func GetUserProfile(userID, botToken string) (*UserProfile, error)

GetUserProfile fetches a user's profile from Discord API

Jump to

Keyboard shortcuts

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