Skip to content

A direct message 'bouncing' service for limited group DMs. Intended for communication for moderators on the Astronomy feed.

License

Notifications You must be signed in to change notification settings

bluesky-astronomy/dm-bouncer

Repository files navigation

DM (direct message) bouncer

A direct message 'bouncing' service for limited group DMs.

This service is intended for communication for moderators of the Astronomy feed, but can be used by anyone to hack group DMs into Bluesky.

A screenshot of the moderation chat.

Developing

Installing

  1. Download the module with
git clone https://github.com/bluesky-astronomy/dm-bouncer.git
  1. Ensure that you have uv installed to manage Python (see the development guide for help)

  2. Set up the environment variables (see below)

  3. Start the bot with:

uv run -m dm_bouncer

Environment variables

To run the DM bouncer, you'll need to set the following environment variables.

Mandatory:

  • DM_BOUNCER_HANDLE - the handle of the account that will bounce DMs (without an @). Any DMs users send to this account will be sent to all other accounts in the DM bouncing group. Example: "moderationchat.astronomy.blue".
  • DM_BOUNCER_PASSWORD - an app password for the account. When creating the app password, make sure it has access to DMs (there's a checkbox.)

Mandatory in development:

  • DM_BOUNCER_ACCOUNTS - a string with comma-separated DIDs of users to receive messages from and send messages to. At least two are required to do anything! You can look up the DID of an account with this tool. Example: "did:plc:jcoy7v3a2t4rcfdh6i4kza25,did:plc:ko747jc5ma4iarwwfwrlv2ct" would bounce DMs between @emily.space and @moderation.astronomy.blue.

Mandatory in production:

  • ASTROFEED_PRODUCTION - set to True to automatically DM all moderators of the astronomy feeds, in addition to the accounts specified in DM_BOUNCER_ACCOUNTS.
  • BLUESKY_DATABASE - a connection string for a remote MySQL database (see the astrofeed-lib docs for more information.)

Optional:

  • DM_BOUNCER_CHECK_TIME - how often to check for new messages (default: 60 seconds)
  • DM_BOUNCER_MINIMUM_MOD_LEVEL - minimum mod level in production to be included in the DM bouncing circle (default: 1, the lowest)

About

A direct message 'bouncing' service for limited group DMs. Intended for communication for moderators on the Astronomy feed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages