Skip to content

hackerdrinks-sg/hackerdrunk_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hackerdrunk_bot

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

Current Goals

  1. To observe and record user joins so as to graph out the social graph of our members going forward
  2. This bot will eventually have authentication/verification functionality to allow our shared services to interact and verify a user who is signing up

Usage

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)

Development

To run this locally for development:

  1. Make sure you have an existing Telegram bot account already created
  2. Copy .env.sample into .env and replace values with actual values
  3. export $(cat .env | xargs) # to save and use the env
  4. Make sure your bot has joined the room that you specified in the ROOM_ID
  5. go run main.go

Sample output

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"}

Contributing

PRs are very much welcomed!

About

Telegram Bot for the hackerdrinks Telegram chat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages