From f0b1711d64412d4d655dea28d4304402e126c49f Mon Sep 17 00:00:00 2001 From: matej2 <11059438+matej2@users.noreply.github.com> Date: Thu, 16 Jan 2025 17:10:13 +0100 Subject: [PATCH] Removed unused methods, added links to reply --- main.py | 2 +- replies.py | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/main.py b/main.py index 70882af..1e4fdf6 100644 --- a/main.py +++ b/main.py @@ -16,7 +16,7 @@ def main_stream(): if result is not None: body = result.group(1) - if reddit_instance.reply_to_comment(body, item): + if reddit_client.reply_to_comment(body, item): item.mark_read() else: item.reply(Const.NOT_DETECTED) diff --git a/replies.py b/replies.py index d9ad598..2b2ee25 100644 --- a/replies.py +++ b/replies.py @@ -47,18 +47,21 @@ def get_response_message(city: str, msg: str, nearby: Optional[str]): if city is None: message = f''' {msg} -{FOOTER} +{Const.FOOTER} ''' else: message = f''' Information for location: {city}:\n\n {msg} \n\n -Locations/events nearby: {nearby}\n\n -{FOOTER}''' - return message +Links:\n +[wiki]({WIKI_URL.format(city)})\n +[visitacity]({get_visit_link(city)})\n +[google maps]({get_map_link(city)})\n +[booking]({get_booking_url(city)})\n +[wandermap]({get_wander_url(city)})\n +[tumblr]({get_th_url(city)})\n +[pinterest]({get_pt_url(city)})\n +Locations/events nearby: {nearby}\n\n +{Const.FOOTER}''' -def is_replied(submission): - for comment in submission.comments: - if comment.author is not None and comment.author.name == user: - return True - return False \ No newline at end of file + return message \ No newline at end of file