Skip to content

Commit ba04078

Browse files
TophattedWasTakenlifehackerhansoleip618
authored
memes: specify direction of rotation; always use first person when kurisu is being rotated (#1451)
* memes: specify direction of rotation always use first person when kurisu is being rotated * memes: simplify is_kurisu string manipulation It was getting unreadable with so many nested ifelses so just oneline it all. * Update memes.py --------- Co-authored-by: lifehackerhansol <lifehackerhansol@ds-homebrew.com> Co-authored-by: eip <36315290+eip618@users.noreply.github.com>
1 parent 8b8272c commit ba04078

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

cogs/memes.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ async def rotate(self, ctx: KurisuContext, u: discord.Member, degrees: int = Non
780780
MAX_DEGREES = 10000
781781

782782
base_degrees = random.randint(-1080, 1080)
783+
is_kurisu = (u.id == self.bot.user.id) # are we Kurisu?
783784

784785
if degrees is not None:
785786
if abs(degrees) > MAX_DEGREES:
@@ -790,15 +791,18 @@ async def rotate(self, ctx: KurisuContext, u: discord.Member, degrees: int = Non
790791
total_degrees = base_degrees
791792

792793
total_rotations = total_degrees / 360
793-
msg = f"{u.mention} has been rotated {base_degrees} degrees."
794+
795+
msg = f"{u.mention if not is_kurisu else 'I'} have been rotated {base_degrees} degrees. "
794796

795797
if degrees is not None:
796-
if u.id == self.bot.user.id: # are we Kurisu?
797-
msg += f" This means I am now at {total_degrees} degrees, which is {total_rotations:.2f} rotations." # respond with useless level of detail if so
798-
else:
799-
msg += f" This means the user is now at {total_degrees} degrees, which is {total_rotations:.2f} rotations." # otherwise normal detail
798+
msg += f"This means {'the user is' if not is_kurisu else 'I am'} now at {total_degrees} degrees, which is"
799+
else:
800+
msg += " That is" # lol
801+
802+
if total_degrees < 0: # directions update
803+
msg += f" {abs(total_rotations):.2f} leftward rotations."
800804
else:
801-
msg += f" That is {total_rotations:.2f} rotations."
805+
msg += f" {total_rotations:.2f} rightward rotations."
802806

803807
await self._meme(ctx, msg, True)
804808

0 commit comments

Comments
 (0)