QuiltMC / cozy-discord

Discord bot used for Quilt's day-to-day tasks. Discord avatar based on Feuerfuchs blobfox emoji at https://www.feuerfuchs.dev/en/projects/blobfox-emojis/
Mozilla Public License 2.0
23 stars 24 forks source link

Prompt for attachments to be uploaded to mclo.gs #66

Open Fnige opened 1 year ago

Fnige commented 1 year ago

Description

When an uploaded attachment is detected by Cozy, it should answer with the suggestion to upload the logs directly to mclo.gs, with a button to do that automatically. The attachment should also be removed if possible.

Rationale

Uploading to mclo.gs helps out in some areas like not needing to download the file to read it fully and being able to actually help with problems on mobile.

This also been discussed in the Discord suggestion 1049616224717385768.

API

mclo.gs has an API available over at api.mclo.gs.

Implementation requirements

  1. The embed shown is as small as possible, or perhaps even a normal message and can be dismissed
  2. You can opt-out
  3. The privacy concerns are taken into account (clearly stating that click the button will share the logs with Aternos).
lukebemish commented 1 year ago

mclo.gs currently is extremely hard to read on mobile due to text wrapping and the lack of a "view raw" button; are we sure we should be encouraging it as a standard for log sharing? Or, rather, have we considered other log posting options as alternatives before settling in this one?

Fnige commented 1 year ago

Tbh others should be looked into (Or quilts own solution if wanted), we originally went with mclo.gs just because it was the first thing we knew of and worked well enough for us

lukebemish commented 1 year ago

That's fair. I'd say having text not wrap is vital given how unreadable it makes logs on mobile, or even on desktop with quilt's mod table, so looking into alternatives is probably a good idea

Fnige commented 1 year ago

Alternatively we could just do this: https://github.com/aternosorg/mclogs/issues/59

Soapy7261 commented 1 year ago

mclo.gs currently is extremely hard to read on mobile due to text wrapping and the lack of a "view raw" button; are we sure we should be encouraging it as a standard for log sharing? Or, rather, have we considered other log posting options as alternatives before settling in this one?

Despite the lack of a button, there is an API end point (https://api.mclo.gs/1/raw/[id]) you can use to view the raw log, works for users too although its near impossible to find if you aren't looking in the API docs

lukebemish commented 1 year ago

That would be the issue. Whatever solution we use, I'd like to be able to click the link in discord and be able to immediately read the logs. Text wrapping is by far the larger issue. if they can fix that, great, though I'd still like to try and lay out the reasoning we have for picking this particular paste service as opposed to any others; it may be worth looking at any other servers with similar systems and known limitations or advantages in practice.

Jamalam360 commented 1 year ago

There is a raw logs button now and a checkbox to disable word wrapping

lukebemish commented 1 year ago

The checkbox to disable word wrap is at the bottom. Requiring scrolling through the whole thing if you're on mobile. But distinctly an improvement; I still think we should do more to justify this particular paste service if we want to push it

JulianVennen commented 1 year ago

clicking on the blue line count at the top will bring you to the bottom of the log instantly. The wrap option is also stored as a cookie so if you always want wrapping to be disabled you just need to click it once.

Southpaw1496 commented 1 year ago

One of the other projects I work on, Minecraft Community Support, has a project called DSWarp which wraps files from Discord's CDN in a web view. This means that files can automatically be made available in a web view, and their availability is tied directly to their existence on Discord's CDN. That may altogether be a more practical solution.