Naxesss / Aiess

A web scraper and discord bot for osu! mapping/modding related event feeds.
18 stars 2 forks source link

Ranked maps updates displaying incorrectly on mobile #1

Closed chayleaf closed 3 years ago

chayleaf commented 3 years ago

Example screenshot: https://cdn.discordapp.com/attachments/545953942677487616/759342567472627726/Screenshot_20200926_141544_com.discord.jpg

Qualified and loved maps seem fine, probably because the embed has an author field. Until around a week or less ago it was fine so it's probably related to a discord update, but i wonder if this can be quickfixed somehow on the bot side.

Naxesss commented 3 years ago

Sadly I have no control over how the embed container is displayed, only the predefined elements within it. The footer fields are necessary to display both an icon and text at the bottom of the embed; afaik there's no other way to do that.

So I think this is more of an issue with Discord's mobile view than with anything I can fix (without changing the embeds' look drastically).

chayleaf commented 3 years ago

The issue is when footer isn't there - for ranked maps there's no footer and the issue occurs, for qualified maps there is a footer and there's no issue. I reckon it's caused by the fact footer is, in fact, always set, even when it's empty -

embed.set_footer(
    text     = format_footer_text(event),
    icon_url = format_footer_icon_url(event)
)

not setting it at all when it shouldn't be set might fix the issue

Naxesss commented 3 years ago

I've now restarted Aiess with this instead:

if format_footer_text(event) is not None:
        embed.set_footer(
            text     = format_footer_text(event),
            icon_url = format_footer_icon_url(event)
        )

Let me know if it works

chayleaf commented 3 years ago

Doesn't work sadly... are there any more difference between Qualified and Ranked embeds that could cause the issue?

Naxesss commented 3 years ago

As far as I can see it's just any embed without a footer/description field. In this case I can't use a description, since that lands above any field title. The regular embed title (which goes above the embed description) uses different formatting; larger font size and no emoji support, so it'd drastically change the look.

We'll just have to leave this to mobile Discord devs to sort out on their end (to my knowledge this all works fine on iOS, so I'd guess this is unique to the Android version of Discord).