lunarflu HF staff christopher commited on
Commit
93f0fb1
·
verified ·
1 Parent(s): d2af64a

Fix emoji in hyperlink bug (#8)

Browse files

- Fix emoji in hyperlink bug (0b0581572589924f8a65e05e67b814025a5562c3)


Co-authored-by: Christopher Akiki <[email protected]>

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -16,6 +16,7 @@ from datetime import datetime, timedelta # for times
16
  from pytz import timezone # for times
17
  import asyncio # check if used
18
  import logging
 
19
 
20
  zurich_tz = timezone("Europe/Zurich")
21
 
@@ -47,7 +48,7 @@ async def on_message(message):
47
  """Backup"""
48
 
49
  number_of_messages = number_of_messages + 1
50
- message_link = f"[#{message.channel.name}]({message.jump_url})"
51
  msgcnt = message.content
52
  backup_message = f"{number_of_messages} | {message_link} | {message.author.id} | {message.author}: {msgcnt}"
53
  # check for attachments
 
16
  from pytz import timezone # for times
17
  import asyncio # check if used
18
  import logging
19
+ import urllib.parse
20
 
21
  zurich_tz = timezone("Europe/Zurich")
22
 
 
48
  """Backup"""
49
 
50
  number_of_messages = number_of_messages + 1
51
+ message_link = f"[#{urllib.parse.quote(message.channel.name)}]({message.jump_url})"
52
  msgcnt = message.content
53
  backup_message = f"{number_of_messages} | {message_link} | {message.author.id} | {message.author}: {msgcnt}"
54
  # check for attachments