Skip to content

Commit

Permalink
merged changes with master
Browse files Browse the repository at this point in the history
  • Loading branch information
Bombg committed Oct 13, 2024
2 parents ee3035c + 8b158e8 commit c6cbccc
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 9 deletions.
10 changes: 5 additions & 5 deletions DefaultConstants.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Constants:
# COPY THIS FILE AND CREATE YOUR OWN VERSION NAMED AppConstants.py THAT WAY YOU CAN PULL CHANGES WITHOUT OVERWRITING SETTINGS
TEST_SERVER = False
SASSBOT_LOG_LEVEL = 10 # DEBUG = 10, INFO = 20, WARNING = 30, ERROR = 40, CRITICAL = 50
SASSBOT_LOG_LEVEL = 20 # DEBUG = 10, INFO = 20, WARNING = 30, ERROR = 40, CRITICAL = 50
OTHER_LIBRARIES_LOG_LEVEL = 20 # DEBUG = 10, INFO = 20, WARNING = 30, ERROR = 40, CRITICAL = 50
if TEST_SERVER:
GUILD_ID =313876691082674178 #Guild ID of the discord server
Expand All @@ -24,7 +24,7 @@ class Constants:
CONFESS_REVIEW_COMMAND_ID = 1159423004346957834

KICK_PROXY = ""
FANS_PROXY = "192.168.50.253:8888"
FANS_PROXY = "127.0.0.1:8888"
OF_PROXY = ""
else:
GUILD_ID =1058859922219081778 #Guild ID of the discord server
Expand All @@ -47,7 +47,7 @@ class Constants:
CONFESS_REVIEW_COMMAND_ID = 1159321755270250570

KICK_PROXY = ""
FANS_PROXY = "172.18.0.2:8888"
FANS_PROXY = "127.0.0.1:8888"
OF_PROXY = ""

WAIT_BETWEEN_MESSAGES = 1800 # minimum amount of time in seconds the stream has to be offline before new notification messages.
Expand All @@ -59,8 +59,8 @@ class Constants:
TIME_BEFORE_REVIEW_RESET = 300 # Time a whitelisted person has to review a confession before its added back to the queue

# Nodriver default for retries is 4, but for slow machines this could require a lot more (raspberry pi 3b+ tested with 20 and still fails occasionally)
NODRIVER_BROWSER_CONNECT_RETRIES = 35
NODRIVER_WAIT_MULTIPLIER = 10 # multiplier for nodriver waits. Make this longer for slower machines
NODRIVER_BROWSER_CONNECT_RETRIES = 25
NODRIVER_WAIT_MULTIPLIER = 8 # multiplier for nodriver waits. Make this longer for slower machines

# Platform Check Timers - all in seconds
KICK_CHECK_TIMER = 180
Expand Down
9 changes: 9 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
4. In the Constants.py file, change the GUILD_ID value to the guild id of your server, and each platform NOTIFICATION_CHANNEL_ID to the channel ID you want alerts posted to.
To easily get both of these IDs, in discord advanced options turn on developer mode. After that you can right click servers/channels and a new option to copy the IDs will be available.
Also edit and add vairus URLs to your streamer in Constants.py. Everything is described in comments.
- After editing constants you can create a copy called AppConstants.py - This will be used before DefaultConstants.py. So you can pull changes without stashing or overwriting
5. Generate the database with 'python GenerateDatabase.py' or 'python3 GenerateDatabase.py'
6. Replace images in the image folder with those of your streamer, but keep same file names.
- images/errIcon.png - icon used for embeds if there is an issue getting one from the platform, or if one doesn't exist
Expand Down Expand Up @@ -96,6 +97,14 @@
4. If the requesting ip is in a state that requires age verification, some of these checkers wont work.

### Update History
- 10/12/2024
- Moved more things to config to constants
- Changing thumbnail behavior
- Changing default avatar/Icon paths/images
- Constants.py renamed to DefaultConstants.py
- You can create your own version of Constants.py called AppConstants.py. Just copy over the contents of constants into this file, it's untracked and you can pull changes without stashing!
- AppConstants.py is used before DefaultConstants.py
- ghcr.io/bombg/sassbot:latest - now supports arm as well. The package ghcr.io/bombg/sassbot:latest-arm is no longer needed.
- 10/11/2024
- added workflow to auto make docker images. They are
- ghcr.io/bombg/sassbot:latest
Expand Down
37 changes: 33 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# /home/bombg/Repos/SassBot/Constants.py:/opt/SassBot/Constants.py
# Becomes
# /Example/Repos/SassBot/Constants.py:/opt/SassBot/Constants.py -- Right side of the colon stays the same
# Make sure you've edited Constants, created the /secrets/token file AND generated the database before you start the image (Follow intructions Steps 1-5)
# Make sure you've edited Constants, created the /secrets/token file AND generated the database before you start the image (Follow intructions Steps 1-6)
services:
sassbot:
image: ghcr.io/bombg/sassbot:latest #ghcr.io/bombg/sassbot:latest-arm for arm processors i.e. Raspberry Pi
image: ghcr.io/bombg/sassbot:latest
volumes:
- /home/bombg/Repos/SassBot/AppConstants.py:/opt/SassBot/AppConstants.py
- /home/bombg/Repos/SassBot/secrets:/opt/SassBot/secrets
Expand All @@ -20,14 +20,43 @@ services:

# The example below is if you want to look at images nodriver has created for troubleshooting purposes
# Make sure you touch create the jpg files before you start the image or they'll be created as folders (and be useless)
#
# services:
# sassbot:
# image: ghcr.io/bombg/sassbot:latest
# volumes:
# - /home/bombg/Repos/SassBot/Constants.py:/opt/SassBot/Constants.py
# - /home/bombg/Repos/SassBot/AppConstants.py:/opt/SassBot/AppConstants.py
# - /home/bombg/Repos/SassBot/secrets:/opt/SassBot/secrets
# - /home/bombg/Repos/SassBot/sassBot.db:/opt/SassBot/sassBot.db
# - /home/bombg/Repos/SassBot/Fae/FaeIcon.png:/opt/SassBot/images/errIcon.png
# - /home/bombg/Repos/SassBot/Fae/FaeErr.jpg:/opt/SassBot/images/twitErrImg.jpg
# - /home/bombg/Repos/SassBot/Fae/FaeC.png:/opt/SassBot/images/avatars/calmStreamer.png
# - /home/bombg/Repos/SassBot/Fae/FaeP.png:/opt/SassBot/images/avatars/pissedStreamer.png
# - /home/bombg/Repos/SassBot/Fansscreenshot.jpg:/opt/SassBot/Fansscreenshot.jpg
# - /home/bombg/Repos/SassBot/Ofscreenshot.jpg:/opt/SassBot/Ofscreenshot.jpg
# - /home/bombg/Repos/SassBot/KickScreenshot.jpg:/opt/SassBot/KickScreenshot.jpg
# restart: unless-stopped
# restart: unless-stopped


# Yet another version that includes a restarter container to reboot the container once a day - be sure to rename `faebot-sassbot-1` to the name of your actual bot container

# services:
# sassbot:
# image: ghcr.io/bombg/sassbot:latest
# volumes:
# - /home/bombg/Repos/SassBot/AppConstants.py:/opt/SassBot/AppConstants.py
# - /home/bombg/Repos/SassBot/secrets:/opt/SassBot/secrets
# - /home/bombg/Repos/SassBot/sassBot.db:/opt/SassBot/sassBot.db
# - /home/bombg/Repos/SassBot/Fae/FaeIcon.png:/opt/SassBot/images/errIcon.png
# - /home/bombg/Repos/SassBot/Fae/FaeErr.jpg:/opt/SassBot/images/twitErrImg.jpg
# - /home/bombg/Repos/SassBot/Fae/FaeC.png:/opt/SassBot/images/avatars/calmStreamer.png
# - /home/bombg/Repos/SassBot/Fae/FaeP.png:/opt/SassBot/images/avatars/pissedStreamer.png
# - /home/bombg/Repos/SassBot/Fansscreenshot.jpg:/opt/SassBot/Fansscreenshot.jpg
# - /home/bombg/Repos/SassBot/Ofscreenshot.jpg:/opt/SassBot/Ofscreenshot.jpg
# - /home/bombg/Repos/SassBot/KickScreenshot.jpg:/opt/SassBot/KickScreenshot.jpg
# restart: unless-stopped
# restarter:
# image: docker:cli
# volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
# command: ["/bin/sh", "-c", "while true; do sleep 86400; docker restart faebot-sassbot-1; done"]
# restart: unless-stopped

0 comments on commit c6cbccc

Please sign in to comment.