mirror of https://github.com/stijndcl/didier
Remove unnecessary variables
parent
c43710a429
commit
982a4bb056
|
@ -107,7 +107,6 @@ class SchoolSlash(commands.Cog):
|
||||||
|
|
||||||
with open("files/compbio_benchmarks_2.json", "w") as fp:
|
with open("files/compbio_benchmarks_2.json", "w") as fp:
|
||||||
file[submission] = ctx.user.id
|
file[submission] = ctx.user.id
|
||||||
|
|
||||||
json.dump(file, fp)
|
json.dump(file, fp)
|
||||||
|
|
||||||
return await ctx.respond(f"✅ Submission **{submission}** is aan jouw naam gelinkt.", ephemeral=True)
|
return await ctx.respond(f"✅ Submission **{submission}** is aan jouw naam gelinkt.", ephemeral=True)
|
||||||
|
|
|
@ -26,12 +26,10 @@ def get_member_or_user(ctx: Union[ApplicationContext, Context], user_id: int) ->
|
||||||
return member
|
return member
|
||||||
|
|
||||||
# Try to fetch the user
|
# Try to fetch the user
|
||||||
user = ctx.bot.get_user(user_id)
|
return ctx.bot.get_user(user_id)
|
||||||
return user
|
|
||||||
|
|
||||||
# Guild exists, use that instead
|
# Guild exists, use that instead
|
||||||
mem = ctx.guild.get_member(user_id)
|
return ctx.guild.get_member(user_id)
|
||||||
return mem
|
|
||||||
|
|
||||||
|
|
||||||
def get_display_name(ctx: Union[ApplicationContext, Context], user_id: int) -> str:
|
def get_display_name(ctx: Union[ApplicationContext, Context], user_id: int) -> str:
|
||||||
|
|
Loading…
Reference in New Issue