Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
VG67 + Bot Enhancements (#105)
Browse files Browse the repository at this point in the history
* docker compose split

* move convoy into new folder

* go stuff pt 1

* go stuff pt 2

* basic golang rest api created

* move into docker compose file

* mango db stuff

* mongo deploy basic config

* create new command REST

* update db item value

* get command values

* vg67 assets

* update bk stuff

* update bk stuff

* update bk stuff

* update bk stuff

* remove logger from convoy bot

* create seperate assets for discord bots

* remove cringe config

* remove cringe config v2

* update assets

* wholesome bk

Co-authored-by: Ousikai <[email protected]>
  • Loading branch information
oscoDOTblog and Ousikai authored Jan 9, 2023
1 parent 902c700 commit f673f2a
Show file tree
Hide file tree
Showing 92 changed files with 838 additions and 178 deletions.
38 changes: 1 addition & 37 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,38 +1,2 @@
### --- Python
# virtualenv
*venv*
bin/
include/
lib/
local/
.DS_Store
secrets*
*.pyc
*.log
nohup.out
__pycache__
.pytest_cache
.cache
job_manager.db
### --- Golang
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
config.json
secrets*
File renamed without changes.
Binary file added assets-discord/Annette/Annette_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets-discord/Annette/Annette_Quotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
I bring joy!
Let's have some fun!
Sing with me!
Here, a gift!
Binary file added assets-discord/Artur/Artur_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets-discord/Artur/Artur_Quotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Blessed night!
I've put my heart into this.
Just for you.
It's snowing.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets-discord/BlackKnight/BlackKnight_Quotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The winter festival is upon us.
For the holiday.
The night is still.
Are you the praying type?
Binary file added assets-discord/Bruno/Bruno_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets-discord/Bruno/Bruno_Quotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
What a festival it is!
The winter's blessing.
A gift. Here!
Hasten your slumber!
Binary file added assets-discord/Cordelia/Cordelia_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets-discord/Cordelia/Cordelia_Quotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Duo: It's a beautiful night!
Duo: "It's time!" "I know!"
Cordelia: Got something for you.
Selena: I hope you're happy...
Binary file added assets-discord/Dorothea/Dorothea_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets-discord/Dorothea/Dorothea_Quotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The stars twinkle above…
Sing along!
This'll be fun.
Just for you!
Binary file added assets-discord/Lysithea/Lysithea_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets-discord/Lysithea/Lysithea_Quotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Duo: We're just that good!
Duo: A gift! Be grateful.
Lysithea: This is for you!
Lute: Have a pleasant eve.
Binary file added assets-discord/Mirabilis/Mirabilis_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets-discord/Mirabilis/Mirabilis_Quotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Yay, festival...
A gift for you...
Are we having fun yet?
Nap time...
Binary file modified assets/Annette/Annette_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions assets/Annette/Annette_Quotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
I'm not gonna lose!
Get lost!
I'll show you!
I can help too!
I bring joy!
Let's have some fun!
Sing with me!
Here, a gift!
Binary file added assets/Artur/Artur_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/Artur/Artur_Quotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Blessed night!
I've put my heart into this.
Just for you.
It's snowing.
Binary file modified assets/BlackKnight/BlackKnight_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions assets/BlackKnight/BlackKnight_Quotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Know your place.
Will you survive?
Fool.
Give your all.
The winter festival is upon us.
For the holiday.
The night is still.
Are you the praying type?
4 changes: 0 additions & 4 deletions assets/BlackKnight/Black_Knight_Quotes.txt

This file was deleted.

Binary file added assets/Bruno/Bruno_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/Bruno/Bruno_Quotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
What a festival it is!
The winter's blessing.
A gift. Here!
Hasten your slumber!
Binary file added assets/Cordelia/Cordelia_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/Cordelia/Cordelia_Quotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Duo: It's a beautiful night!
Duo: "It's time!" "I know!"
Cordelia: Got something for you.
Selena: I hope you're happy...
Binary file modified assets/Dorothea/Dorothea_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions assets/Dorothea/Dorothea_Quotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Duo: A curse on you!
Duo: Let's give them a show. Yeah!
Dorothea: All eyes on us!
Lene: Watch your step!
The stars twinkle above…
Sing along!
This'll be fun.
Just for you!
Binary file modified assets/Lysithea/Lysithea_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions assets/Lysithea/Lysithea_Quotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Begone!
Don't waste my time!
Did you think I'd miss?
Die with your regrets.
Duo: We're just that good!
Duo: A gift! Be grateful.
Lysithea: This is for you!
Lute: Have a pleasant eve.
Binary file added assets/Mirabilis/Mirabilis_Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/Mirabilis/Mirabilis_Quotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Yay, festival...
A gift for you...
Are we having fun yet?
Nap time...
6 changes: 6 additions & 0 deletions bots/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Lists of Bots
* Convoy - Python API for Gauntlet Scores
* Genny - Python Discord Bot for Twitter Alerts
* Golembane - Golang API for Database Updates
* Rebecca - Python Discord Bot for Discord Alerts
* Robin - Golang Discord Bot for Database Updates
38 changes: 38 additions & 0 deletions bots/convoy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
### --- Python
# virtualenv
*venv*
bin/
include/
lib/
local/
.DS_Store
secrets*
*.pyc
*.log
nohup.out
__pycache__
.pytest_cache
.cache
job_manager.db
### --- Golang
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
config.json
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions bots/convoy/assets_check_discord.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from config import * # current VG particpants and round dates

print("Hello world!")
units = [vg_unit_1, vg_unit_2, vg_unit_3, vg_unit_4, vg_unit_5, vg_unit_6, vg_unit_7, vg_unit_8]
for unit in units:
print('Testing %s' % unit)
quote_url = "./assets-discord/%s/%s_Quotes.txt" % (unit, unit)
quotes = open(quote_url).read().splitlines()
print("~~~")
print(quotes[0])
print(quotes[1])
print(quotes[2])
print(quotes[3])
print("~~~")
img_url = "./assets-discord/%s/%s_Preview.png" % (unit, unit)
fd = open(img_url, 'r')
# pngdata = fd.read()
fd.close()
print('Assets of %s successfully opened' % unit)
32 changes: 16 additions & 16 deletions convoy/config.py → bots/convoy/config.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# UTC is 8 Hours Ahead PST
vg_assets_root_path="assets"
vg_hashtag='#ND'
vg_hashtag='#SF!'
vg_test=False
vg_url='https://support.fire-emblem-heroes.com/voting_gauntlet/tournaments/66'
round_1_start_raw = 'Dec 01 2022 7:00AM'
round_1_end_raw = 'Dec 03 2022 4:00AM'
round_2_start_raw = 'Dec 03 2022 7:00AM'
round_2_end_raw = 'Dec 05 2022 4:00AM'
round_3_start_raw = 'Dec 05 2022 7:00AM'
round_3_end_raw = 'Dec 07 2022 4:00AM'
vg_unit_1 = "Camilla"
vg_unit_2 = "Laegjarn"
vg_unit_3 = "Igrene"
vg_unit_4 = "Shinon"
vg_unit_5 = "Shamir"
vg_unit_6 = "Cherche"
vg_unit_7 = "Haar"
vg_unit_8 = "Heath"
vg_url='https://support.fire-emblem-heroes.com/voting_gauntlet/tournaments/67'
round_1_start_raw = 'Dec 26 2022 7:00AM'
round_1_end_raw = 'Dec 28 2022 4:00AM'
round_2_start_raw = 'Dec 28 2022 7:00AM'
round_2_end_raw = 'Dec 30 2022 4:00AM'
round_3_start_raw = 'Dec 30 2022 7:00AM'
round_3_end_raw = 'Jan 01 2023 4:00AM'
vg_unit_1 = "Lysithea"
vg_unit_2 = "Cordelia"
vg_unit_3 = "Artur"
vg_unit_4 = "Mirabilis"
vg_unit_5 = "BlackKnight"
vg_unit_6 = "Bruno"
vg_unit_7 = "Dorothea"
vg_unit_8 = "Annette"
discord_channel_ids = {
vg_unit_1 : 783177258713874443,
vg_unit_2 : 783177296646897665,
Expand Down
17 changes: 17 additions & 0 deletions bots/convoy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: "3.8"
services:
convoy:
build: .
container_name: convoy
# image: atemosta/feh-gauntlet-bot:convoy-latest
command: uvicorn api:app --host 0.0.0.0 --port 5057 --reload
restart: unless-stopped
networks:
- feh-vg-bot
ports:
- 5057:5057
volumes:
- ../../assets:/app/assets
networks:
feh-vg-bot:
external: true
Loading

0 comments on commit f673f2a

Please sign in to comment.