Skip to content

Commit

Permalink
feat: Implement Google Gemini API (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
heerboi authored Sep 20, 2024
1 parent 2340881 commit 77483ac
Show file tree
Hide file tree
Showing 9 changed files with 1,334 additions and 335 deletions.
1 change: 1 addition & 0 deletions .example.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ BOT_TOKEN="BOT_TOKEN"
SKULLBOARD_CHANNEL_ID=SKULLBOARD_CHANNEL_ID
REQUIRED_REACTIONS=5
TENOR_API_KEY="TENOR_API_KEY"
GEMINI_API_KEY="GEMINI_API_KEY"
2 changes: 2 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
SKULLBOARD_CHANNEL_ID: ${{ secrets.SKULLBOARD_CHANNEL_ID }}
REQUIRED_REACTIONS: ${{ secrets.REQUIRED_REACTIONS }}
TENOR_API_KEY: ${{ secrets.TENOR_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: |
echo "$KEY" > private_key && chmod 600 private_key
ssh -v -o StrictHostKeyChecking=no -i private_key ${USER}@${HOSTNAME} '
Expand All @@ -92,6 +93,7 @@ jobs:
echo SKULLBOARD_CHANNEL_ID=${{ secrets.SKULLBOARD_CHANNEL_ID }} >> .env
echo REQUIRED_REACTIONS=${{ secrets.REQUIRED_REACTIONS }} >> .env
echo TENOR_API_KEY=${{ secrets.TENOR_API_KEY }} >> .env
echo GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }} >> .env
docker load -i duckbot.tar.gz
docker compose up -d
'
1,192 changes: 861 additions & 331 deletions poetry.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ python = "^3.11"
"discord.py" = "2.3.2"
black = "^24.4.2"
poetry-dotenv-plugin = "^0.2.0"
google-generativeai = "^0.7.2"
pathlib = "^1.0.1"
aiosqlite = "^0.20.0"
schedule = "^1.2.2"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/faq.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def food(self, interaction: Interaction):
# Determining if games night is on the next day of function call
if time_difference.days < 2 and time_difference.days > 1:
await interaction.response.send_message(
f"The next Friday Night Games with food is on tomorrow. Join us in the Duck Lounge at 5pm!"
"The next Friday Night Games with food is on tomorrow. Join us in the Duck Lounge at 5pm!"
)
return

Expand Down
Loading

0 comments on commit 77483ac

Please sign in to comment.