Skip to content

Commit

Permalink
Fixed the Application Didnt Repond Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
varundeepsaini committed Sep 24, 2023
1 parent 5e37c05 commit e170ca3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cogs/contests.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async def upcoming_contest(self, ctx: commands.Context):

response.add_field(name=field_name, value=field_value, inline=False)

await ctx.send(embed=response)
await ctx.respond(embed=response)


def setup(bot: commands.Bot):
Expand Down
4 changes: 2 additions & 2 deletions cogs/cp_profiles/codechef.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ async def codechef(self, ctx: commands.Context, handle: str):
"""
if formatted_response["success"]:
embed = codechef_embed(formatted_response, handle)
await ctx.send(embed=embed)
await ctx.respond(embed=embed)
return
else:
await ctx.send("Invalid username")
await ctx.respond("Invalid username")


def setup(bot: commands.Bot):
Expand Down
4 changes: 2 additions & 2 deletions cogs/cp_profiles/codeforces.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ async def codeforces(self, ctx: commands.Context, username: str):
print("Failed to decode JSON data from API response.")
return
if data["status"] == "FAILED":
await ctx.send("Invalid username")
await ctx.respond("Invalid username")
return
else:
embed = codeforces_embed(data["result"][0])

await ctx.send(embed=embed)
await ctx.respond(embed=embed)


def setup(bot: commands.Bot):
Expand Down

0 comments on commit e170ca3

Please sign in to comment.