Skip to content

Commit

Permalink
Merge pull request #123 from placeTW/Someone0759-patch
Browse files Browse the repository at this point in the history
Update fucking.py
  • Loading branch information
brownsugar-bobamilktea authored Oct 2, 2024
2 parents 256864d + b79a871 commit 87e7a2a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions commands/fucking/fucking.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
from modules import logging
from discord import app_commands
from pathlib import Path
from random import randint


GO_THE_FUCK_TO_SLEEP_URL = "https://www.youtube.com/watch?v=teIbh8hFQos"
GO_THE_FUCK_TO_SLEEP_URLS = ["https://www.youtube.com/watch?v=teIbh8hFQos", # original
"https://www.youtube.com/watch?v=U08XWOx3XYM", # jennifer garner
"https://www.youtube.com/watch?v=G61kMUbpljY", # ani difranco
"https://www.youtube.com/watch?v=pgijPsNPbto", # werner herzog
# "https://www.youtube.com/watch?v=VQ_WzkHRtX8", # age restricted (some old lady)
"https://www.youtube.com/watch?v=p2CHhuOlaH0", # lauren but it has a thanks for watching
"https://www.youtube.com/watch?v=aAGcalD-tNg", # jack sparrow
"https://www.youtube.com/watch?v=O51ZccrFeJQ"] # "That guy with a voice"
YOU_HAVE_TO_FUCKING_EAT_URL = "https://www.youtube.com/watch?v=ENdNzzJcB7Q"
MIKA_FUCKING_EAT_DIR = Path(Path(__file__).parent, "fuckingeatmika.png")
COOLDOWN_DURATION = 60
Expand All @@ -24,13 +32,14 @@ async def go_the_fuck_to_sleep(interaction: discord.Interaction, user_to_ping: d
current_user_id = interaction.user.id
current_time = time.time()
time_difference = current_time - (user_timestamps.get(current_user_id, {}).get("gothefucktosleep", 0))
url = GO_THE_FUCK_TO_SLEEP_URLS[randint(0, len(GO_THE_FUCK_TO_SLEEP_URLS)-1)]
if time_difference < COOLDOWN_DURATION:
await interaction.response.send_message(
f"<@{current_user_id}> {GO_THE_FUCK_TO_SLEEP_URL} (cooldown: {round(COOLDOWN_DURATION - time_difference)}s)"
f"<@{current_user_id}> {url} (cooldown: {round(COOLDOWN_DURATION - time_difference)}s)"
)
return

await interaction.response.send_message(f"<@{user_to_ping.id}> {GO_THE_FUCK_TO_SLEEP_URL}")
await interaction.response.send_message(f"<@{user_to_ping.id}> {url}")

log_event = {
"event": "gothefucktosleep",
Expand Down

0 comments on commit 87e7a2a

Please sign in to comment.