Skip to content

Commit

Permalink
refactor: Remove unused ephemeral func
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed Oct 23, 2024
1 parent c110a4e commit 8a34add
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions hoyo_buddy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import pathlib
from collections.abc import Sequence

from discord import Interaction, Member, User
from discord import Member, User


def get_now() -> datetime.datetime:
Expand Down Expand Up @@ -169,13 +169,6 @@ def get_floor_difficulty(floor_name: str, season_name: str) -> str:
return floor_name.replace(season_name, "").replace(":", "").replace("•", "").strip()


def ephemeral(i: Interaction) -> bool:
"""Returns true if the interaction needs to be ephemeral."""
if i.guild is None:
return False
return not i.app_permissions.send_messages


def get_static_img_path(image_url: str, folder: str) -> pathlib.Path:
extra_folder = image_url.split("/")[-2]
filename = clean_url(image_url).split("/")[-1]
Expand Down

0 comments on commit 8a34add

Please sign in to comment.