Skip to content

Commit e4d94b0

Browse files
committed
refactor functions file
1 parent 9510e25 commit e4d94b0

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

run.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
bot = commands.Bot(command_prefix=PREFIX)
1111

12-
instituicoes = {"fcup": 0, "feup": 2}
12+
restaurants = {"fcup": 0, "feup": 2}
1313

1414
actions = {"help": func.getHelp,
1515
"ajuda": func.getHelp,
@@ -18,8 +18,8 @@
1818
"hj": func.getToday,
1919
"amanha": func.getTomorrow,
2020
"am": func.getTomorrow,
21-
"semana": func.getSemana,
22-
"sem": func.getSemana,
21+
"semana": func.getWeek,
22+
"sem": func.getWeek,
2323
}
2424

2525
@bot.event # on_ready
@@ -31,13 +31,13 @@ async def on_ready():
3131

3232
@bot.command()
3333
async def multirest(ctx, *args):
34-
instId = instituicoes.get("fcup") #Default
34+
instId = restaurants.get("fcup") #Default
3535
instName = "fcup"
3636

3737
if len(args) == 0:
3838
await ctx.send(func.invalidArg())
3939

40-
possible_args = list(actions.keys()) + list(instituicoes.keys())
40+
possible_args = list(actions.keys()) + list(restaurants.keys())
4141

4242
#get common elements between args and possible_args
4343
common_args = [x for x in args if x in possible_args]
@@ -49,7 +49,7 @@ async def multirest(ctx, *args):
4949
await ctx.send(func.invalidArg())
5050
elif len(common_args) == 2:
5151
if "feup" in common_args:
52-
instId = instituicoes.get("feup")
52+
instId = restaurants.get("feup")
5353
instName = "feup"
5454
for x in common_args:
5555
if x in actions:

0 commit comments

Comments
 (0)