spoiler

Hello world

  • 496 Posts
  • 249 Comments
Joined 3 years ago
cake
Cake day: July 8th, 2023

help-circle





  • Paste the link in the search bar of another instance. If the post is cached, it’ll return it. Ideally, use the link to the post on the author’s instance, rather than the link to the post on another instance.

    Technical answer:

    Instances store posts from other instances. Every post on the fediverse has a unique ID called the “actor ID”. The actor ID of a post is the URL of the post on the instance of the user that authored the post. On the Lemmy web UI, you can retrieve this by right-clicking on the rainbow star icon below any post and copying the link.

    To retrieve the details for a cached post, you can call resolve_object?q=<actor-id>. For example:

    https://sh.itjust.works/api/v3/resolve_object?=https%3A%2F%2Flemmings.world%2Fpost%2F41938713

    For convenience, the Lemmy UI calls this when you paste a URL in the search bar.

    This can work for any URL that points to the post, but you should use the actor ID where possible. The Lemmy backend knows the actor ID of every post it has, but it may not know whichever URL you’re querying with, and you may get a null result when the post is cached.

    I hope this helps.























  • Sjmarf@sh.itjust.workstoLemmy@lemmy.ml•lemmy to mastodon?
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    1 year ago

    The Lemmy UI doesn’t allow you to see others’ private messages, no, but you shouldn’t consider them to be private. It’s possible for instance admins to read them, and in the past there’s been exploits allowing anyone to read them. If you need more private messaging, use Matrix instead.





  • Sjmarf@sh.itjust.workstoLemmy Shitpost@lemmy.world•The Legends is among us
    link
    fedilink
    English
    arrow-up
    104
    arrow-down
    1
    ·
    1 year ago

    For your viewing pleasure:

    for entry in entries:
        if entry['time'] + 1800 < time():
            guild = self._bot.get_guild(int(entry['guild_id']))
            member = guild.get_member(int(entry['user_id']))
            if member is not None:
                if member.activity.name is not None:
                    if member.activity.name.lower() == "league of legends":
                        await member.send("The 30 minutes has elapsed and you are still playing league, get banned.")
                        await member.ban(delete_message_days=0, reason='playing league')