logfilereader: Fix macOS version detection & Reply to analyzed log (#45)

* Fix macOS version detection correctly this time

* Reply to the message with the uploaded log

* Apply black formatting
This commit is contained in:
TSRBerry 2023-04-28 22:38:23 +02:00 committed by GitHub
parent 45538eec6f
commit 5be9915501
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -662,7 +662,7 @@ class LogFileReader(Cog):
old_mainline_version = re.compile(r"^\d\.\d\.(\d){4}$") old_mainline_version = re.compile(r"^\d\.\d\.(\d){4}$")
pr_version = re.compile(r"^\d\.\d\.\d\+([a-f]|\d){7}$") pr_version = re.compile(r"^\d\.\d\.\d\+([a-f]|\d){7}$")
ldn_version = re.compile(r"^\d\.\d\.\d\-ldn\d+\.\d+(?:\.\d+|$)") ldn_version = re.compile(r"^\d\.\d\.\d\-ldn\d+\.\d+(?:\.\d+|$)")
mac_version = re.compile(r"^\d\.\d\.\d\-macos\d+\.\d+(?:\.\d+|$)") mac_version = re.compile(r"^\d\.\d\.\d\-macos\d+(?:\.\d+(?:\.\d+|$)|$)")
is_channel_allowed = False is_channel_allowed = False
@ -813,7 +813,9 @@ class LogFileReader(Cog):
True for elem in self.uploaded_log_info if filename in elem.values() True for elem in self.uploaded_log_info if filename in elem.values()
] ]
if not any(uploaded_logs_exist): if not any(uploaded_logs_exist):
reply_message = await message.channel.send("Log detected, parsing...") reply_message = await message.channel.send(
"Log detected, parsing...", reference=message
)
try: try:
embed = await self.log_file_read(message) embed = await self.log_file_read(message)
if "Ryujinx_" in filename: if "Ryujinx_" in filename: