🧡 Goldy Core

Goldy Core Class

Goldy Config

Presence

class GoldyBot.goldy.presence.Activity(name: str, type: ActivityTypes, url: str | None = None)[source]

Bases: object

Goldy bot discord activity.

name: str
type: ActivityTypes
url: str | None = None
class GoldyBot.goldy.presence.ActivityTypes(value)[source]

Bases: Enum

Goldy Bot enum class of different discord activity types.

LISTENING_TO = 2
LIVE_ON_TWITCH = 1
PLAYING_GAME = 0
WATCHING = 3
class GoldyBot.goldy.presence.Presence(goldy: Goldy)[source]

Bases: object

Class that allows you to control the status, game activity and more of Goldy Bot

async change(status: Status | str | None = None, activity: Activity | None = None, afk: bool | None = None) None[source]

Updates the presence of Goldy Bot. Like e.g online, idle, dnd.

class GoldyBot.goldy.presence.Status(value)[source]

Bases: Enum

Goldy Bot enum class of discord status.

AWAY = 'idle'
DND = 'dnd'
DO_NOT_DISTURB = 'dnd'
IDLE = 'idle'
INVISIBLE = 'invisible'
ONLINE = 'online'

Token

exception GoldyBot.goldy.token.NoDatabaseToken[source]

Bases: GoldyBotError

exception GoldyBot.goldy.token.NoDiscordToken[source]

Bases: GoldyBotError

class GoldyBot.goldy.token.Token(discord_token: str | None = None, database_url: str | None = None)[source]

Bases: object

Handles grabbing the token in many various ways.

create_token_env_file() bool[source]
database_url: str | None = None
discord_token: str | None = None
get_token_from_env() Tuple[str | None, str | None][source]

Returns tuple of tokens from a .env file.

Tuple index order:

  • Discord Bot Token

  • MongoDB Url