I am currently working on a discord bot for one of my servers, and for this piece of it to work, I need it to bring up the dates for Monday through Sunday when given the current date, and week day. I would like to avoid using a lot of if statements if possible.
What I have tried: I have tried using if statements to complete this task, but just find it makes too much work, and messy code.
Parts of current code:
The Date
time = ctx.message.timestamp
day = time.day
month = time.month
year = time.year
date = [year, month, day]
The Week Day:
with open(dir_data + "Week Day.txt",'r+') as f:
system_day = f.readline()
Note: The week day is in the form of a number. (Ex. Monday = 1)