{"id":29958594,"url":"https://github.com/dearrude/siahe","last_synced_at":"2025-08-03T20:47:32.003Z","repository":{"id":221902776,"uuid":"755341247","full_name":"DearRude/siahe","owner":"DearRude","description":"A ticketing Telegram bot for Ferdowsi University's clubs and associations","archived":false,"fork":false,"pushed_at":"2025-02-15T21:51:36.000Z","size":143,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T22:27:48.149Z","etag":null,"topics":["ferdowsi-university-of-mashhad","fum","gotd","telegram-bot","telgram","ticketing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DearRude.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2024-02-09T23:27:08.000Z","updated_at":"2025-02-15T21:51:40.000Z","dependencies_parsed_at":"2024-04-28T23:20:55.399Z","dependency_job_id":"ce5bf83a-ad2b-4dbb-bf10-009e6d2757ff","html_url":"https://github.com/DearRude/siahe","commit_stats":null,"previous_names":["dearrude/fumtheatrebot","dearrude/siahe","dearrude/fumcommunitybot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DearRude/siahe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DearRude%2Fsiahe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DearRude%2Fsiahe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DearRude%2Fsiahe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DearRude%2Fsiahe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DearRude","download_url":"https://codeload.github.com/DearRude/siahe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DearRude%2Fsiahe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268610652,"owners_count":24278150,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ferdowsi-university-of-mashhad","fum","gotd","telegram-bot","telgram","ticketing"],"created_at":"2025-08-03T20:46:51.212Z","updated_at":"2025-08-03T20:47:31.962Z","avatar_url":"https://github.com/DearRude.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+title: siahe\n#+html: \u003cimg style=\"height: 30em;\"src=\"https://i.imgur.com/mXwY95v.jpeg\"/\u003e\n\n=siahe= is designed to help university clubs sell tickets for their events through the Telegram messaging platform. The bot provides a seamless ticket purchasing experience for users, allowing them to easily browse available events, select tickets, and sign up directly within the Telegram app.\n\n** Build\n1. Have the latest version of =go= installed in you path.\n2. Clone this repository and change directory.\n3. Build.\n#+begin_src bash\ngo build .\n#+end_src\n\n** Run\n=siahe= inputs a set of configuration entries. This entries can either be passed by environment variables, argument flags or =.env= file. To see the full list of flags either do =siahe --help= or check out [file:config.go] directly.\n\nHere is an example usage of an =.env= file.\nGenerate the env file.\n#+begin_src bash\ncp .env.sample .env\n#+end_src\nFill out the env file with specified parameters.\n#+begin_src bash\n$EDITOR .env\n#+end_src\nRun the program.\n#+begin_src bash\nsiahe\n#+end_src\n\n*** Run by Docker\n=siahe= [[https://github.com/dearrude/siahe/pkgs/container/siahe][images]] are built upon each commit on Github container registry (ghcr) with =latest= tag.\n\nGenerate the following =docker-compose.yml= file.\n#+begin_src yaml\nversion: '3'\nservices:\n    siahe:\n    image: ghcr.io/dearrude/siahe:latest\n    container_name: siahe\n    volumes:\n        - ./siahe_assets:/home/nonroot/assets\n    environment:\n        APPID: -\n        APPHASH: -\n        BOTTOKEN: -\n        ADMINPASSWORD: -\n        VARIFICATIONCHAT: -\n        BACKUPCHAT: -\n        SQLITEPATH: \"/home/nonroot/assets/db.sqlite\"\n        SESSIONPATH: \"/home/nonroot/assets/session.json\"\n\n#+end_src\n\nRun the containers.\n#+begin_src bash\ndocker compose up -d \u0026\u0026 docker compose logs -f\n#+end_src\n\nIn case of updates, run the following the command to update and re-run the container:\n#+begin_src bash\ndocker compose pull\ndocker compose up -d --force-recreate\ndocker compose logs -f\n#+end_src\n\n** Run\n*Note*: ~\u003cparam\u003e~ means a mandatory parameter while ~[param]~ means an optional parameter.\n\n1. Make sure that the bot is running by sending ~/start~ command to it.\n2. Make an account by ~/add_account~ command.\n3. Change your status to *moderator* by ~/promote_me \u003cadmin_password\u003e~. A moderator can _promote_ and _demote_ other *admin* aside from running admin commands.\n4. Run other commands accordingly.\n\n*** User commands\n- ~/start~ boots the bot. Given a ~getTicket_\u003cevent_id\u003e~ as parameter, it can be used to purchase ticket(s).\n- ~/add_account~ add a permanent account to bot, similar to signing up to a website authentication.\n- ~/get_account~ prints data about user's own account.\n- ~/delete_account~ delete user's account.\n- ~/available_events~ shows all available events to get tickets for\n\n*** Admin commands\n**** User handling\n- ~/get_user \u003cuser_id\u003e~ prints a user's info by theirs telegram user_id\n- ~/delete_user \u003cuser_id\u003e~ deletes a user's account.\n- ~/export_users~ exports all users info into a CSV file.\n- ~/message_all~ sends a message to all signed up users.\n\n**** Place handling\nA place is a database entity that events take place in. For more info, run ~/add_place~ command.\n\n- ~/add_place~ add and define a place to database. This will generate a unique ~place_id~.\n- ~/get_place \u003cplace_id\u003e~ prints data about place.\n- ~/get_places~ prints a minimal data about all places. This include their place_id and name. It is useful if you want to event a place id by its name.\n- ~/delete_place \u003cplace_id\u003e~ deletes a place by its id.\n\n**** Event handling\nAn event is a database entity that users can get tickets for. For more info, run ~/add_event~ command.\n\n- ~/add_event~ add and define a event to database. This will generate a unique ~event_id~.\n- ~/get_event \u003cevent_id\u003e~ prints data about event.\n- ~/get_events~ prints a minimal data about all events. This include their event_id and name. It is useful if you want to find an event id by its name.\n- ~/delete_event \u003cevent_id\u003e~ deletes a place by its id.\n- ~/activate_event \u003cevent_id\u003e~ activating an event enables users to get ticket for it. Events are activated by default upon creation.\n- ~/deactivate_event \u003cevent_id\u003e~ deactivating an event disables users to get ticket for it.\n- ~/flush_reserves \u003cevent_id\u003e~ delete all reserved tickets for an event.\n- ~/message_event~ sends a message to all who got a ticket for the event.\n\n**** Ticket handling\nA ticket is a sign for users that they can attend events. In order to get a ticket for the user, they can open a URL of such pattern: ~https://t.me/\u003cbot_username\u003e?start=getTicket_\u003cevent_id\u003e~. For example if bot's username is ~@fumTheatreSignupBot~ and you want to generate a link for users to get tickets for event_id 1, according to schema the URL is: ~https://t.me/fumTheatreSignupBot?start=getTicket_1~. In order to show all available events, the following URL can be used: ~https://t.me/fumTheatreSignupBot?start=availableEvents~\n\n- ~/get_ticket \u003cticket_id\u003e~ shows info about a ticket and its owner. Used to check the validity of the ticket.\n- ~/attend_ticket \u003cticket_id\u003e~ changes the ticket _status_ from ~completed~ to ~attended~. Used to track who showed up if they got any ticket.\n- ~/unattend_ticket \u003cticket_id\u003e~ reverses the functionality of prior command.\n- ~/delete_ticket \u003cticket_id\u003e~ removes a ticket from database.\n- ~/export_tickets \u003cevent_id\u003e~ exports all tickets of an event to a CSV file.\n- ~/preview_tickets \u003cevent_id\u003e~ preview all tickets of an event to a telegram message.\n- ~/print_tickets \u003cevent_id\u003e~ generate a printable PDF of all tickets of an event.\n- ~/count_tickets~ count all completed tickets in for active events based on their place capacity.\n- ~/database_storage~ count all tickets in database. Since ticket code is a 4-digit code, its count shouldn't exceed 9999. Delete deactivated events for their tickets to be deleted and free up the ticket codes.\n\n** Licence\nAGPLv3+\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdearrude%2Fsiahe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdearrude%2Fsiahe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdearrude%2Fsiahe/lists"}