https://github.com/thitiph0n/line-whoami-bot
A simple bot to get your LINE Official Account's userId and groupId
https://github.com/thitiph0n/line-whoami-bot
cloudflare-workers hono line line-bot
Last synced: about 1 month ago
JSON representation
A simple bot to get your LINE Official Account's userId and groupId
- Host: GitHub
- URL: https://github.com/thitiph0n/line-whoami-bot
- Owner: thitiph0n
- Created: 2025-01-25T14:37:21.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-01-25T17:26:02.000Z (3 months ago)
- Last Synced: 2025-01-25T18:24:15.672Z (3 months ago)
- Topics: cloudflare-workers, hono, line, line-bot
- Language: TypeScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LINE Whoami Bot
The LINE Whoami Bot is a simple LINE chatbot that responds to specific text triggers (whoami, my id, ไอดีของฉัน) by sending the user's LINE ID or source information back to them. This bot is built using the Hono framework and integrates with the LINE Messaging API.
## How It Works
1. When a user sends a message to the bot, the message is processed by the /webhook endpoint.
2. If the message matches one of the trigger texts (whoami, my id, ไอดีของฉัน), the bot retrieves the user's LINE ID or source information.
3. The bot sends a reply message containing the user's information## Setup
### Prerequisites
- A LINE Developer account and a LINE Messaging API channel.
- Cloudflare Workers or another compatible runtime environment.### Environment Variables
You need to set the following environment variable:
- LINE_MESSAGING_ACCESS_TOKEN: Your LINE Messaging API access token.
- LINE_CHANNEL_SECRET: Your LINE channel secret### Installation
1. Clone this repository:
```bash
git clone https://github.com/thitiph0n/line-whoami-bot.git
cd line-whoami-bot
```2. Deploy the bot to your runtime environment (e.g., Cloudflare Workers):
```bash
yarn run deploy
```3. Set up the LINE Messaging API webhook URL to point to your deployed bot's /webhook endpoint.
## Development
```bash
yarn install
yarn run dev
```