From dc20820737c1e7b0d64bb159fd51a40ea9214514 Mon Sep 17 00:00:00 2001 From: Stanley Date: Tue, 6 May 2025 21:46:35 -0400 Subject: [PATCH 1/2] chore(env): setup development and production python venvs --- apps/discord-bot/.env.example | 1 + apps/discord-bot/.gitignore | 2 ++ apps/discord-bot/README.md | 8 ++------ apps/discord-bot/main.py | 8 ++++++++ apps/discord-bot/requirements.txt | 2 ++ 5 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 apps/discord-bot/.env.example create mode 100644 apps/discord-bot/.gitignore create mode 100644 apps/discord-bot/main.py create mode 100644 apps/discord-bot/requirements.txt diff --git a/apps/discord-bot/.env.example b/apps/discord-bot/.env.example new file mode 100644 index 00000000..8141df0d --- /dev/null +++ b/apps/discord-bot/.env.example @@ -0,0 +1 @@ +DISCORD_TOKEN= \ No newline at end of file diff --git a/apps/discord-bot/.gitignore b/apps/discord-bot/.gitignore new file mode 100644 index 00000000..fee10802 --- /dev/null +++ b/apps/discord-bot/.gitignore @@ -0,0 +1,2 @@ +.env +/core/apps/discord-bot/.venv* \ No newline at end of file diff --git a/apps/discord-bot/README.md b/apps/discord-bot/README.md index f3f07025..ef042630 100644 --- a/apps/discord-bot/README.md +++ b/apps/discord-bot/README.md @@ -1,7 +1,3 @@ ### Discord Bot - -This is where the discord bot will go. (Hi Stanley!) - -You may delete this read me (or not, i don't care!). - -Please use virtual envs for development... +for venv run source .venv/bin/activate if get error about pip commands not found +(hi alex) \ No newline at end of file diff --git a/apps/discord-bot/main.py b/apps/discord-bot/main.py new file mode 100644 index 00000000..d345ad42 --- /dev/null +++ b/apps/discord-bot/main.py @@ -0,0 +1,8 @@ +import discord +from discord.ext import commands +import logging +from dotenv import load_dotenv +import os + +load_dotenv() # loads environment variables from .env file +token = os.getenv('DISCORD_TOKEN') \ No newline at end of file diff --git a/apps/discord-bot/requirements.txt b/apps/discord-bot/requirements.txt new file mode 100644 index 00000000..95004ae6 --- /dev/null +++ b/apps/discord-bot/requirements.txt @@ -0,0 +1,2 @@ +discord.py +python-dotenv \ No newline at end of file From f09c9b1e15dd638ac0de39dc6b1ed79a9689fb84 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 7 May 2025 08:34:06 -0500 Subject: [PATCH 2/2] changed comment --- apps/discord-bot/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/discord-bot/main.py b/apps/discord-bot/main.py index d345ad42..4a83c50a 100644 --- a/apps/discord-bot/main.py +++ b/apps/discord-bot/main.py @@ -4,5 +4,5 @@ from dotenv import load_dotenv import os -load_dotenv() # loads environment variables from .env file -token = os.getenv('DISCORD_TOKEN') \ No newline at end of file +load_dotenv() +token = os.getenv('DISCORD_TOKEN')