https://github.com/ekaone/panic-button
🧈 Simple push button for fun, send message to Telegram Group or Channel
https://github.com/ekaone/panic-button
button panic telegram-bot
Last synced: 7 months ago
JSON representation
🧈 Simple push button for fun, send message to Telegram Group or Channel
- Host: GitHub
- URL: https://github.com/ekaone/panic-button
- Owner: ekaone
- Created: 2021-03-29T05:01:58.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-30T06:38:24.000Z (almost 5 years ago)
- Last Synced: 2025-05-31T13:05:29.950Z (9 months ago)
- Topics: button, panic, telegram-bot
- Language: TypeScript
- Homepage: https://panic-button-eka.vercel.app/
- Size: 239 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](#)
# `Panic-Button`
[][ama]
## Contents
- [Installation](#cloud-installation)
- [Usage](#interrobang-usage)
- [Documentation](#books-documentation)
- [How to contribute](#yum-how-to-contribute)
- [License](#yum-how-to-contribute)
## :cloud: Installation
```js
git clone https://github.com/ekaone/panic-button.git
cd panic-button
npm install
npm run dev
```
## :interrobang: Usage
> NOTE: You must enable (allowing) your location access in your browser.
Press the button and **hold** around `1 second`, it will send the data includes coordinates latitude, longitude and local time to telegram groups or your channel through REST API.
:rocket: [Demo](https://panic-button-eka.vercel.app/)
## :books: Documentation
Make sure setup a Telegram Bot with [`@BotFather`](https://t.me/botfather) and create a new one `@your_group` or `@your_channel`, also invite your `Bot` that you have created before to your `group` or your `channel`, once you have setup BOT Token and group or channel, there are 2 options:
- Drop to `.env.local` (change .env.example) and use it as `process.env.NEXT_PUBLIC_BOT_TOKEN` and `process.env.NEXT_PUBLIC_GROUP/CHANNEL` at the [`url component`](https://github.com/ekaone/panic-button/blob/main/components/button.tsx)
- Use local storage at setting menu as this [demo](https://panic-button-eka.vercel.app/)
Checkout documentation [Telegram API](https://core.telegram.org/bots/api) for more details.
## :yum: How to contribute
Have an idea? Found a bug? See [how to contribute][contributing].
## :scroll: License
[MIT][license] © [Eka Prasetia][website]
[website]: https://www.ekaprasetia.com/
[contributing]: https://github.com/ekaone/contribute
[license]: https://en.wikipedia.org/wiki/MIT_License
[ama]: https://github.com/ekaone/ama