Home of @HackerdrinksInviteBot on Telegram
The hackerdrunk_bot
is our project to setup a bot for hackerdrinks' Telegram chat
See the issue list for tasks to pick up and/or discuss
- To observe and record user joins so as to graph out the social graph of our members going forward
- This bot will eventually have authentication/verification functionality to allow our shared services to interact and verify a user who is signing up
This bot when added to a room, will look out for members of the group who add another user directly or by sharing a invite link to another user which was generated by DMing the bot with a /invite
command.
Commands:
Command | Remarks |
---|---|
/invite | Generates an invite link that can be shared with a wider audience (5 min expiry) |
To run this locally for development:
- Make sure you have an existing Telegram bot account already created
- Copy
.env.sample
into.env
and replace values with actual values - export $(cat .env | xargs) # to save and use the env
- Make sure your bot has joined the room that you specified in the
ROOM_ID
- go run main.go
The bot writes into a local file everytime someone joins the Telegram Group (room) either by a direct invite (Add User) or by generating a link with the /invite
command to the bot.
A sample of how an entry looks like is below:
{"inviter":"usernameA","invitee":"username","invite_type":"direct_invite","timestamp":"2022-04-17T05:32:33.102199829Z"}
PRs are very much welcomed!