diff --git a/defs/msg.py b/defs/msg.py index eadb36a..0fd59c5 100644 --- a/defs/msg.py +++ b/defs/msg.py @@ -42,9 +42,11 @@ def gen_update_msg(data: Module) -> TrackMessage: data.updatedAt, data.releases[0].description.replace(r"\r\n", "\n")) url = None + name = data.name.replace('.', '_') + "-" + data.latestRelease if data.releases: if data.releases[0].releaseAssets: url = data.releases[0].releaseAssets[0].url - name = data.name.replace('.', '_') + "-" + data.latestRelease + mime = data.releases[0].releaseAssets[0].name.split(".")[-1:][0] + name += "." + mime button = gen_button(data) return TrackMessage(text, url, name, button) diff --git a/plugins/track.py b/plugins/track.py index f5c5f08..db1061f 100644 --- a/plugins/track.py +++ b/plugins/track.py @@ -16,7 +16,6 @@ async def send_track_msg(file, track_msg): if file: await app.send_document(channel_id, file, caption=track_msg.text[:1000], - file_name=track_msg.name, force_document=True, parse_mode="html", reply_markup=track_msg.button) @@ -44,7 +43,6 @@ async def run_every_30_minute(): print(f"Send button error") await app.send_document(channel_id, file, caption=track_msg.text, - file_name=track_msg.name, force_document=True, parse_mode="html",) except Exception as e: