{"id":22845637,"url":"https://github.com/biaw/phone","last_synced_at":"2025-04-28T16:44:51.601Z","repository":{"id":37795617,"uuid":"332271229","full_name":"biaw/phone","owner":"biaw","description":"A Discord application to call your cellphone through Twilio in case of emergencies. Built with Cloudflare Workers","archived":false,"fork":false,"pushed_at":"2025-04-24T20:23:50.000Z","size":2131,"stargazers_count":41,"open_issues_count":3,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-24T21:31:22.801Z","etag":null,"topics":["bot","cf-worker","cf-workers","cloudflare","cloudflare-worker","cloudflare-workers","discord","discord-bot","discord-interactions","discord-rest","twilio","twilio-caller"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/biaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["promise"],"patreon":"promises","custom":["paypal.me/nottechsupport"]}},"created_at":"2021-01-23T17:43:14.000Z","updated_at":"2025-04-24T20:23:54.000Z","dependencies_parsed_at":"2023-09-28T21:22:43.895Z","dependency_job_id":"538d935b-e1d0-48a1-b9e8-1df85c42e7f0","html_url":"https://github.com/biaw/phone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biaw%2Fphone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biaw%2Fphone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biaw%2Fphone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biaw%2Fphone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/biaw","download_url":"https://codeload.github.com/biaw/phone/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251347944,"owners_count":21575183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","cf-worker","cf-workers","cloudflare","cloudflare-worker","cloudflare-workers","discord","discord-bot","discord-interactions","discord-rest","twilio","twilio-caller"],"created_at":"2024-12-13T03:18:02.334Z","updated_at":"2025-04-28T16:44:51.568Z","avatar_url":"https://github.com/biaw.png","language":"TypeScript","funding_links":["https://github.com/sponsors/promise","https://patreon.com/promises","paypal.me/nottechsupport"],"categories":[],"sub_categories":[],"readme":"[![Deploy](https://img.shields.io/github/actions/workflow/status/biaw/phone/build-and-publish.yml?label=build)](https://github.com/biaw/phone/actions/workflows/build-and-publish.yml)\r\n[![Linting](https://img.shields.io/github/actions/workflow/status/biaw/phone/linting.yml?label=quality)](https://github.com/biaw/phone/actions/workflows/linting.yml)\r\n[![DeepScan grade](https://deepscan.io/api/teams/16173/projects/19527/branches/625870/badge/grade.svg)](https://deepscan.io/dashboard#view=project\u0026tid=16173\u0026pid=19527\u0026bid=625870)\r\n[![GitHub Issues](https://img.shields.io/github/issues-raw/biaw/phone.svg)](https://github.com/biaw/phone/issues)\r\n[![GitHub Pull Requests](https://img.shields.io/github/issues-pr-raw/biaw/phone.svg)](https://github.com/biaw/phone/pulls)\r\n\r\n# Discord Phone Worker [![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/biaw/phone)\r\n\r\nA Discord application to call your phone (yes, your actual phone) through Twilio in case of emergencies.\r\n\r\n## Screenshots\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003eClick to see a GIF of the `/call` command in action\u003c/summary\u003e\r\n\r\n  ![biaw phone optimized](https://user-images.githubusercontent.com/10573728/178745844-a582e66a-9865-44cd-b6ef-15dd8ca023f6.gif)\r\n\u003c/details\u003e\r\n\r\n## Usage examples\r\n\r\n* If you're managing some form of service, like a webserver or Discord bot then your staff can call your cellphone if it's down.\r\n* If a server you're admin in is getting raided and you're not available, they can call your cellphone to let you know.\r\n\r\nGenerally, it's a way for other Discord members to contact you through your phone. The main purpose is to be even more available, like when you don't have Wi-Fi/celluar data availale.\r\n\r\n## Setting up with Workers\r\n\r\n1. [Deploy with Workers](https://deploy.workers.cloudflare.com/?url=https://github.com/biaw/phone)\r\n2. Insert the environment variables listed in the [`wrangler.toml`](https://github.com/biaw/phone/blob/main/wrangler.toml) file. You can either use the `wrangler` command, or do it through the worker dashboard.\r\n3. Edit the Discord application and set the interactions endpoint to `https://phone.WORKER_SUBDOMAIN.workers.dev/interaction`. This is where the bot will receive interactions.\r\n4. Go to `https://phone.WORKER_SUBDOMAIN.workers.dev/update-commands?key=DISCORD_PUBLIC_KEY` to update and register the `/call` slash command.\r\n5. Add the bot by visiting `/invite`. Make sure to uncheck \"Public bot\" in the Discord Developer portal so other people can't add it to servers you don't want to have access to call you.\r\n6. It might take some time before the command appears because of Discord's caching, but you should be able to use the `/call` command within the hour!\r\n\r\n## How calling works\r\n\r\n```mermaid\r\nsequenceDiagram\r\n  autonumber\r\n  participant D as Discord API\r\n  participant W as Cloudflare Worker\r\n  participant T as Twilio API\r\n\r\n  activate D\r\n  D-\u003e\u003eW: Send an interaction\r\n  activate W\r\n\r\n  alt signature header is not valid\r\n    W--\u003e\u003eD: 401 Unauthorized\r\n  end\r\n\r\n  W-\u003e\u003eT: Send call request\r\n  activate T\r\n  T-\u003e\u003eT: Calls the user\r\n  T--\u003e\u003eW: 200 OK\r\n  deactivate T\r\n  W--\u003e\u003eD: 200 OK (with Interaction Response)\r\n  deactivate D\r\n  deactivate W\r\n\r\n  loop until call is finished\r\n    T-\u003e\u003eW: Call Status Update\r\n    activate T\r\n    activate W\r\n    W-\u003e\u003eD: Update Interaction with new status\r\n    activate D\r\n    D--\u003e\u003eW: 200 OK\r\n    deactivate D\r\n    W--\u003e\u003eT: 200 OK\r\n    deactivate T\r\n    deactivate W\r\n  end\r\n```\r\n\r\n## Pricing\r\n\r\nIt might cost a tiny little bit of money after you've used up your free trial at Twilio. The amount really depends on your location, the Twilio phone number's location etc. - but the free trial will probably get you a long way already.\r\n\r\nI think it's obvious enough... but I will not pay for your phone number.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiaw%2Fphone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiaw%2Fphone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiaw%2Fphone/lists"}