Skip to content

Commit

Permalink
Removed unused methods, added links to reply
Browse files Browse the repository at this point in the history
  • Loading branch information
matej2 committed Jan 16, 2025
1 parent 9797e09 commit f0b1711
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
21 changes: 12 additions & 9 deletions replies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
return message

0 comments on commit f0b1711

Please sign in to comment.