Skip to content

Commit

Permalink
fix(kamaitachi): only show sync notice if the user also has chuninet
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-psi committed Dec 16, 2024
1 parent bd3328b commit f41c8c4
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions cogs/chunithm/kamaitachi.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ async def kamaitachi_link(self, ctx: Context, token: Optional[str] = None):
if result is not None:
raise commands.BadArgument(result)

content = "Successfully linked with Kamaitachi."

async with self.bot.begin_db_session() as session, session.begin():
if cookie is None:
cookie = Cookie(
Expand All @@ -132,14 +134,15 @@ async def kamaitachi_link(self, ctx: Context, token: Optional[str] = None):
cookie.kamaitachi_token = token
await session.merge(cookie)

content += (
"\nYou can now use `c>kamaitachi sync` to sync your recent scores.\n"
"\n"
"**It is recommended that you run `c>kamaitachi sync` to sync your recent scores first, "
"before syncing your personal bests with `c>kamaitachi sync pb`.**"
)

return await ctx.reply(
content=(
"Successfully linked with Kamaitachi.\n"
"You can now use `c>kamaitachi sync` to sync your recent scores.\n"
"\n"
"**It is recommended that you run `c>kamaitachi sync` to sync your recent scores first, "
"before syncing your personal bests with `c>kamaitachi sync pb`.**"
),
content=content,
mention_author=False,
)

Expand Down

0 comments on commit f41c8c4

Please sign in to comment.