Skip to content

Instantly share code, notes, and snippets.

@bawanyadam
Last active June 3, 2025 16:20
Show Gist options
  • Select an option

  • Save bawanyadam/2f959560d6c5b6b659484186b3687788 to your computer and use it in GitHub Desktop.

Select an option

Save bawanyadam/2f959560d6c5b6b659484186b3687788 to your computer and use it in GitHub Desktop.

Revisions

  1. bawanyadam revised this gist Jul 8, 2024. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion whatchasay.py
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,11 @@

    # Generate a random number of 'm's between 3 and 20
    m_count = random.randint(3, 20)
    message = "m" * m_count + " whatcha say"
    # Generate a random number of 'y's between 1 and 8
    y_count = random.randint(1, 8)

    # Build the message
    message = "m" * m_count + " whatcha sa" + "y" * y_count

    # Send the post
    post = client.send_post(message)
  2. bawanyadam created this gist Jul 8, 2024.
    15 changes: 15 additions & 0 deletions whatchasay.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    # Install the 'atproto' library from https://docs.bsky.app/docs/get-started
    # Python 3.8 minimum requirement

    from atproto import Client
    import random

    client = Client(base_url='https://bsky.social')
    client.login('user.bsky.social', 'app-password')

    # Generate a random number of 'm's between 3 and 20
    m_count = random.randint(3, 20)
    message = "m" * m_count + " whatcha say"

    # Send the post
    post = client.send_post(message)