Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fucking.py #123

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading