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

Commit

Permalink
Bug Fix
Browse files Browse the repository at this point in the history
* Event wasn't cleared properly
  • Loading branch information
UrekD committed May 21, 2022
1 parent 7c9361d commit 053eacc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ services:
- cname=workshop #channel name where it responds to commands
- collectionid=1332156191 #workshop collection id found in url
- cdelay=1 #delay between each mods checked in seconds
- rdelay=5 #delay on recheck in seconds
- cretry=3 #how many times to retry the recheck mod
- fdelay=300 #how many seconds to wait until monitor runs again after failure ex. on internet failure
volumes:
- botdataa:/data
Expand Down
7 changes: 3 additions & 4 deletions WorkshopMonitor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Source https://github.com/UrekD/Steam-Workshop-Monitor
#Source https://git.urek.eu
import asyncio
from colorama import Fore, Style
import datetime
Expand Down Expand Up @@ -127,7 +127,6 @@ async def on_ready(self):
x = status
if x is None:
x = "git.urek.eu | $help"
print(x)
await bot.change_presence(activity=nextcord.Game(name=x))
now = datetime.datetime.now()
print(now.strftime(f'{Fore.MAGENTA}[INFO] %H:%M:%S {Fore.RED}{bot.user}{Style.RESET_ALL} has connected to nextcord!'))
Expand All @@ -144,13 +143,13 @@ async def my_background_task(self,LA):
await channel.send("Checking for updates!")
await Monitor()
await channel.send("Checking finished sleeping...")
await asyncio.sleep(ctime)
event.clear()
await asyncio.sleep(ctime)
except:
event.clear()
now = datetime.datetime.now()
print(now.strftime(f"{Fore.MAGENTA}[STOP] {Style.RESET_ALL}%H:%M:%S An error has accured current monitor cycle skipped!"))
await asyncio.sleep(fdelay)
event.clear()

bot = Bot(command_prefix='$')
bot.remove_command('help')
Expand Down

0 comments on commit 053eacc

Please sign in to comment.