vvvot

package module
v0.0.0-...-8ff3034 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 10 Imported by: 0

README

vvvot (bot) living on Bluesky

@vvvot.bsky.social.

Usage

show your DID
@vvvot.bsky.social did

Bot responses your DID.

Hi, @vvakame.bsky.social ! your DID is "did:plc:wh4o4bn5ppuxn7saotd2xqzm"
show when your account was created (indexed)
@vvvot.bsky.social birthday

Bot responses when your account was created (indexed) at.

your indexedAt is 2023-04-07 12:48:35 (UTC) / 2023-04-07 21:48:35 (JST)

How does it work?

A simplified process flow is shown below.

sequenceDiagram
    participant Cloud Scheduler
    participant Cloud Run
    participant Bluesky
    
    Cloud Scheduler ->> Cloud Run: kick every 5min
        activate Cloud Run
            Cloud Run ->> Bluesky: app.bsky.notification.listNotifications
                activate Bluesky
                    Bluesky --> Cloud Run: result
                deactivate Bluesky
            alt if find new reply
                Note right of Cloud Run: send reply
                Cloud Run ->> Bluesky: com.atproto.repo.createRecord
                    activate Bluesky
                        Bluesky --> Cloud Run: result
                    deactivate Bluesky
            end
            Cloud Run ->> Bluesky: app.bsky.notification.updateSeen
                activate Bluesky
                    Bluesky --> Cloud Run: result
                deactivate Bluesky
            Cloud Run --> Cloud Scheduler: 200 OK
        deactivate Cloud Run
Why not use stream?

see this

Total Estimated Cost: USD 44.71 per 1 month

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response interface {
	// contains filtered or unexported methods
}

func ProcessNotifications

func ProcessNotifications(ctx context.Context, xrpcc *xrpc.Client) (_ []Response, err error)

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL