Skip to content

Commit e49a8d0

Browse files
memes: temporarily remove rainbow from nick when removegay'd
1 parent 76f6cb4 commit e49a8d0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

cogs/memes.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import discord
55
import math
66
import random
7+
import asyncio
78

89
from discord.ext import commands
910
from typing import TYPE_CHECKING
@@ -814,6 +815,24 @@ async def removegay(self, ctx: KurisuContext, u: discord.Member):
814815
f"{u.mention} has been downgraded from 'yass queen' to 'yeah'."]
815816
await self._meme(ctx, random.choice(removegay_list), True)
816817

818+
if u.nick is not None:
819+
if "🌈" in u.nick:
820+
gay_nick = u.nick
821+
else:
822+
gay_nick = False
823+
elif "🌈" in u.global_name:
824+
gay_nick = u.global_name
825+
else:
826+
gay_nick = False
827+
828+
if gay_nick:
829+
await u.edit(nick=gay_nick.replace("🌈", ""))
830+
await asyncio.sleep(15)
831+
if gay_nick == u.global_name: # race condition but who cares lol
832+
await u.edit(nick=None) # Reset server nick
833+
else:
834+
await u.edit(nick=gay_nick)
835+
817836
@commands.command(hidden=True, aliases=["🅱"])
818837
async def b(self, ctx: KurisuContext):
819838
"""haha, b emoji funny"""

0 commit comments

Comments
 (0)