=============== Bluesky handles =============== The bot may be configured to allow people to self-serve custom subdomain handles for Bluesky Social, based on their Telegram username. Their Telegram username will become the subdomain portion. Every enrolled domain has one or more associated chatrooms that a person must be in to get access to that domain name. Users have two ways to request a custom handle: - the ``/bluesky`` command for :mod:`sewifurs.bot` - the ``/bluesky-handles`` endpoint for :mod:`sewifurs.website` If sewifurs.org can't log into Telegram, it can't check if a user should be able to self-serve a given handle, so this feature will be disabled in that case. Setup ===== Import DNS editors from :mod:`sewifurs.dns`, then use them in `BLUESKY_DOMAINS`. `BLUESKY_DOMAINS` is a `dict[str, DnsEditor]` that maps domain names to DNS editors; each DNS editor has a set of credentials (for a given external hosting service) and list of Telegram chat IDs. It is possible for a single chat to give a user access to multiple domain names. Here is an example of a configured `BLUESKY_DOMAINS`: .. code-block:: from sewifurs.dns import CloudflareEditor, NamecheapEditor, NamecomEditor BLUESKY_DOMAINS = { 'furwaukee.org': NamecomEditor('username', 'token', [-12345]), 'sewifurs.org': NamecheapEditor('username', 'token', [-12345]), 'wifu.rs': CloudflareEditor('email', 'token', [-12345]), } If you are instead setting this through the `SEWIFURS_BLUESKY_DOMAINS` environment variable, keep the Python `dict` literal syntax, but not the module imports; each DNS editor is already imported for you. If this is not a production instance of sewifurs.org, the sandbox domain for Namecheap and testing server for Name.com will automatically be used. .. note:: As of writing, there isn't a global sandbox instance for Cloudflare, so this behavior does not apply there. Registrars ========== As of writing, the supported registrars are: - Cloudflare - Namecheap - Name.com To add new DNS editors, implement the abstract base class :class:`sewifurs.dns.DnsEditor` and use your new class in `BLUESKY_DOMAINS`: .. autoclass:: sewifurs.dns.DnsEditor :members: