Skip to content

Commit

Permalink
Fixed broken code, about to merge
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiatk67 committed Oct 20, 2023
1 parent 3de7240 commit 14c832f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ async def get_rank(ctx, member_id=None):
await ctx.channel.send(file=file)
except Exception as e:
await ctx.channel.send(f"No {member_id} in the database")

###########################
# Function: get_instructor
# Description: Command used to give Instructor role out by instructors
Expand All @@ -450,7 +449,6 @@ async def get_instructor(ctx):
await ctx.send(instructors + " is the Instructor!")
else:
await ctx.send(instructors + " are the Instructors!")

###########################
# Function: set_instructor
# Description: Command used to give Instructor role out by instructors
Expand All @@ -476,7 +474,6 @@ async def set_instructor(ctx, member:discord.Member):
send_messages=True,read_message_history=False)
else:
await ctx.channel.send('Not a valid command for this channel')

###########################
# Function: remove_instructor
# Description: Command used to remove a user from Instructor role by instructors
Expand All @@ -501,7 +498,6 @@ async def remove_instructor(ctx, member:discord.Member):
await channel.set_permissions(member, overwrite=None)
else:
await ctx.channel.send('Not a valid command for this channel')

###########################
# Function: create_event
# Description: command to create event and send to event_creation module
Expand All @@ -517,7 +513,6 @@ async def remove_instructor(ctx, member:discord.Member):
async def create_event(ctx):
''' run event creation interface '''
await event_creation.create_event(ctx, TESTING_MODE)

###########################
# Function: create_event
# Description: command to create event and send to event_creation module
Expand All @@ -532,7 +527,6 @@ async def create_event(ctx):
async def set_spam_settings(ctx):
''' run spam setting prompts '''
await spam.set(ctx)

###########################
# Function: oh
# Description: command related office hour and send to office_hours module
Expand All @@ -547,7 +541,6 @@ async def set_spam_settings(ctx):
async def office_hour_command(ctx, command, *args):
''' run office hour commands with various args '''
await office_hours.office_hour_command(ctx, command, *args)

###########################
# Function: ask
# Description: command to ask question and sends to qna module
Expand Down Expand Up @@ -616,7 +609,6 @@ async def submit_regrade_request(ctx,name:str,questions:str):
else:
await ctx.author.send('Please submit requests in regrade channel.')
await ctx.message.delete()

@submit_regrade_request.error
async def submit_regrade_request_error(ctx, error):
"""
Expand All @@ -638,15 +630,11 @@ async def display_regrade_request(ctx):
Outputs:
- displays regrade requests present in the database
"""

if ctx.channel.name == 'regrade-requests':
await regrade.display_requests(ctx)

else:
await ctx.author.send('Please submit requests in regrade channel.')
await ctx.message.delete()


@bot.command(name='update-request', help='update regrade request')
async def update_regrade_request(ctx,name:str,questions:str):
"""
Expand Down
2 changes: 2 additions & 0 deletions src/office_hours.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ async def check_office_hour_loop():
begin_time = datetime.strptime(str(begin_time).rsplit(' ', 1)[1],
'%H:%M:%S').time()
end_time = datetime.strptime(str(end_time).rsplit(' ', 1)[1], '%H:%M:%S').time()
if office_hour.ta is None:
office_hour.ta = 'bot'
ta_name_channelified = office_hour.ta.lower().replace(" ", "-")
if (begin_time <= curr_time <= end_time and ta_name_channelified
not in office_hour_queues):
Expand Down

0 comments on commit 14c832f

Please sign in to comment.