Highlight message AFTER getting attachment
This commit is contained in:
parent
ca48e4c134
commit
f507f8f4e8
1 changed files with 6 additions and 5 deletions
11
main.py
11
main.py
|
@ -1,8 +1,8 @@
|
|||
import logging
|
||||
import json
|
||||
import os
|
||||
import nio
|
||||
import discord
|
||||
import json
|
||||
import logging
|
||||
import nio
|
||||
import os
|
||||
|
||||
|
||||
def config_gen(config_file):
|
||||
|
@ -225,10 +225,11 @@ async def message_callback(room, event):
|
|||
|
||||
# Get attachments
|
||||
try:
|
||||
attachment = event.url.split("/")[-1]
|
||||
|
||||
# Highlight attachment name
|
||||
message = f"`{message}`"
|
||||
|
||||
attachment = event.url.split("/")[-1]
|
||||
message += f"\n{url}/{homeserver}/{attachment}"
|
||||
except AttributeError:
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue