mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-07 09:52:13 +00:00
* Adding the Discord Bot From https://github.com/GamestonkTerminal/DiscordBot. * Fixed code format to GST * Fixed spelling * Fixed check errors * Reformated with pre-commit * Fixed names of files * Logging and error output capabilities Adds logging for the server and displays errors with commands correction to the user. * Fixed spelling * Fixed bare exceptions * Fixed Formating * Update based on comments * Fixed arguments for economy & debugging for economy/dps menu * Fixed default arguments and made them better for debugging and more robust
33 lines
852 B
Python
33 lines
852 B
Python
import os
|
|
import sys
|
|
import discord
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
env_files = [f for f in os.listdir() if f.endswith(".env")]
|
|
if env_files:
|
|
load_dotenv(env_files[0])
|
|
|
|
# Path to the terminal
|
|
GST_PATH = os.path.join("~", "Documents", "GamestonkTerminal")
|
|
sys.path.append(GST_PATH)
|
|
|
|
# https://discord.com/developers/applications/
|
|
DISCORD_BOT_TOKEN = os.getenv("GT_DISCORD_BOT_TOKEN") or "REPLACE_ME"
|
|
|
|
# https://apidocs.imgur.com
|
|
IMGUR_CLIENT_ID = os.getenv("GT_IMGUR_CLIENT_ID") or "REPLACE_ME"
|
|
|
|
# Settings
|
|
COMMAND_PREFIX = "!"
|
|
DATE_FORMAT = "%Y-%m-%d"
|
|
COLOR = discord.Color.from_rgb(0, 206, 154)
|
|
MENU_TIMEOUT = 30
|
|
DEBUG = True
|
|
|
|
AUTHOR_NAME = "Gamestonk Terminal"
|
|
AUTHOR_ICON_URL = (
|
|
"https://github.com/GamestonkTerminal/GamestonkTerminal/"
|
|
"blob/main/images/gst_logo_green_white_background.png?raw=true"
|
|
)
|