Skip to content

Bot Protocol#36

Merged
PenguinBoi12 merged 1 commit intomainfrom
bot-protocol
Apr 6, 2026
Merged

Bot Protocol#36
PenguinBoi12 merged 1 commit intomainfrom
bot-protocol

Conversation

@PenguinBoi12
Copy link
Copy Markdown
Contributor

This PR add a BotLike protocol to properly add access to methods like get_room to extensions. This should allow extension to do things like:

@extension.event
async def on_member_join(matrix_room: MatrixRoom, event: RoomMemberEvent) -> None:
    if not _is_new_join(event):
        return

    member_name = _member_display_name(room, event.state_key)
    room = extension.get_room(matrix_room:.room_id)

    if room:
        await .send(f"Welcome {member_name}! Glad to have you here.")

@PenguinBoi12 PenguinBoi12 requested a review from jerlendds April 6, 2026 04:45
Copy link
Copy Markdown

@jerlendds jerlendds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM couldve deleted the types to pass CI a la vibe coders - glad you didnt :P

@PenguinBoi12 PenguinBoi12 merged commit cd71354 into main Apr 6, 2026
4 checks passed
@PenguinBoi12 PenguinBoi12 deleted the bot-protocol branch April 6, 2026 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants