Merge pull request #5 from phixxy/development

Fixed bug in blog function
This commit is contained in:
phixxy 2023-07-11 11:55:54 -07:00 committed by GitHub
commit d181eb03b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -308,7 +308,7 @@ async def task_loop():
current_time = time.localtime()
#Run daily tasks
if current_time.tm_hour == 0 and current_time.tm_min == 0 and current_time.tm_sec == 0:
if current_time.tm_hour == 17 and current_time.tm_min == 0 and current_time.tm_sec == 0:
bot_stuff = bot.get_channel(544408659174883328)
output = 'The following tasks failed:\n```'
failed_tasks = []
@ -690,7 +690,8 @@ async def blog(ctx):
if os.path.isfile(blogpost_file):
with open(blogpost_file, 'r') as f:
blogpost_topics = f.read()
topic = f.seek(0).readline()
f.seek(0)
topic = f.readline()
blogpost_topics = blogpost_topics.replace(topic, '')
with open(blogpost_file, 'w') as f:
f.write(blogpost_topics)