Highlight message AFTER getting attachment

This commit is contained in:
git-bruh 2020-11-14 21:04:30 +05:30
parent ca48e4c134
commit f507f8f4e8
No known key found for this signature in database
GPG key ID: E1475C50075ADCE6

11
main.py
View file

@ -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