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')
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.