Memcoin for the Memconomy for @borodutcher
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nikita Kolmogorov 424c00184f Add funding links
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:24:12 -07:00
.github Add funding links 2026-10-08 15:24:12 -07:00
src Merge pull request #20 from usernametrue/patch-3 2022-12-06 07:07:43 -08:00
types fix user model 2018-08-12 17:40:57 -07:00
.env.sample add docs and fix some code 2018-08-12 17:30:15 -07:00
.gitignore done 2018-08-11 14:38:12 -07:00
LICENSE Initial commit 2018-08-11 13:39:45 -07:00
package.json Bump lodash from 4.17.19 to 4.17.21 2021-05-08 12:41:33 +00:00
README.md add docs and fix some code 2018-08-12 17:30:15 -07:00
tsconfig.json refactor(api): refactor api module 2018-08-13 01:17:23 +03:00
tslint.json refactor(api): refactor api module 2018-08-13 01:17:23 +03:00
yarn.lock Bump path-parse from 1.0.6 to 1.0.7 2021-08-10 23:09:20 +00:00

@memecoin_bot

Code of the @memecoin_bot Telegram bot. Reputation + coin economy inside the Telegram chat.

Installation and local launch

  1. Clone this repo: git clone https://github.com/backmeupplz/memcoin
  2. Create .env file with environment variables listed below
  3. Run yarn install in the root folder
  4. Run yarn distribute

Environment variables in .env file

  • USERNAME — Telegram bot username
  • TOKEN — Telegram bot token
  • MONGO — URL of the mongo db
  • SECRET — Secret key to generate auth token
  • PORT — Port for API server
  • ADMIN_ID — ID of the super admin chat

Please, consider refering to provided env.sample for further docs.

API docs

In order to use API, you will have to obtain an API token from @borodutch. After you obtain the API token, you can see it with the /token command in private chat with @memecoin_bot. All requests to the API should contain token header with your API token as a string.

API contains of the following methods sent to http://188.166.96.198:1337:

GET /user/:id

Gets user data by their chat id

Receives:

  • id — user chat id

Returns:

  • User information in the format:
{
  "chatId": 12345,
  "name": "Nikita Kolmogorov",
  "balance": 10
}

POST /transfer

Transfers memecoins from one user to another

Receives:

  • senderId — chat id of the user to send
  • receiverId — chat id of the user to receive
  • amount — number of memecoins to transfer

Returns:

  • Success JSON if everything is ok:
{ "success": true }

Continuous integration

Any commit pushed to master gets deployed to @memecoin_bot via CI Ninja.

License

MIT — use for any purpose. Would be great if you could leave a note about the original developers. Thanks!