Skip to content

Commit

Permalink
Removed useless placeholder
Browse files Browse the repository at this point in the history
Leftover placeholder from testing
  • Loading branch information
PadawanAmy committed Dec 25, 2023
1 parent 10e9811 commit b8f6859
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions Core/Placeholders.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
'author-status': ('interaction.user.status', 'author.status'),
'author-toprole': ('interaction.member.top_role.name', 'author.top_role.name'),
'author-joined': ('interaction.member.joined_at', 'author.joined_at'),
'author-firstjoin': ('', ''),
'author-created': ('interaction.user.created_at', 'author.created_at'),
'author-avatar': ('author.avatar.url', 'author.avatar.url'),

Expand Down Expand Up @@ -68,14 +67,6 @@ def read_config():

config = read_config()

def read_user_file(user_id):
file_path = f"Users/{user_id}.yml"
if os.path.exists(file_path):
with open(file_path, 'r') as file:
data = yaml.safe_load(file)
return data
return None

def get_author_activity(context):
if hasattr(context, 'interaction'):
activities = context.interaction.user.activities
Expand Down Expand Up @@ -123,9 +114,6 @@ def get_placeholder_value(context, key, for_image=False):
elif key == 'datetime-timestamp':
timestamp = int(now.timestamp())
return f"<t:{timestamp}:f>"
if key == 'author-firstjoin':
user_data = read_user_file(context.author.id)
return user_data.get('JoinedServer', 'Unknown') if user_data else 'Unknown'
if key == 'author-mention':
return f"<@{getattr(context.author, 'id', None)}>"
attr_path = placeholder_map.get(key)
Expand Down

0 comments on commit b8f6859

Please sign in to comment.