refactor(fun): simplify if statement

This commit is contained in:
Ryan 2025-02-01 18:43:56 -05:00
parent fbdd442a8e
commit 117438be76
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

7
fun.py
View File

@ -4,6 +4,7 @@ import commands
async def on_message(message):
if "gn" in commands.tokenize(message.content, remove_prefix=False):
if random.random() < 0.01:
await message.add_reaction(random.choice(["💤", "😪", "😴", "🛌"]))
if random.random() < 0.01 and "gn" in commands.tokenize(
message.content, remove_prefix=False
):
await message.add_reaction(random.choice(["💤", "😪", "😴", "🛌"]))