Skip to content

LeekHub/telegram-bot

Repository files navigation

telegram-bot

基于 tw-stock-telegram-bot 修改。

TG 机器人,快速取得个股及大盘即时走势、近期 K 线、相关新闻、盘后资料等,让你在各种不方便打开充满高对比红绿黑看盘软件的场合 (如拥挤的捷运上或办公室而且老板坐你后面) 也能掌握即时报价资讯。

Demo

@LeekHubBot
https://t.me/LeekHubBot
(学术研究开发测试使用,不提供 24/7 不中断服务,亦不保证资料之正确性)

如何使用

前置工作

请先找到 @BotFather 建立新的 Bot 取得 API token,应用 inline mode 以及设定 commands (/setcommands)

执行

1.

git clone https://github.com/x3388638/tw-stock-telegram-bot.git
cd tw-stock-telegram-bot
cp config.js.example config.js
# 将 Bot API token 填入 config.js 中 `botToken`

2.

npm run build
npm start

npm install
npm run dev:watch

Heroku

https://devcenter.heroku.com/articles/container-registry-and-runtime#getting-started

Install the Heroku CLI

Download and install the Heroku CLI.

If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.

$ heroku login

Log in to Container Registry

You must have Docker set up locally to continue. You should see output when you run this command.

$ docker ps

Now you can sign into Container Registry.

$ heroku container:login

Push your Docker-based app

Build the Dockerfile in the current directory and push the Docker image.

$ heroku container:push web

Deploy the changes

Release the newly pushed images to deploy your app.

$ heroku container:release web

功能

/start 导览信息

/chart 盘中走势图

/chart ${stockId} 查询个股

/chart_tse 查询上市指数

/chart_toc 查询指数

/text 盘中文字報价及五档

/text ${stockId} 查询个股

/text_tse 查询上市指数

/text_otc 查询指数

/k 近期 K 线图

/k ${stockId} 查询个股

/k_tse 查询上市指数

/k_otc 查询指数

/news 个股新闻

/after_hours 盘后资料

/after_hours ${stockId} 查询个股盘后资料

/after_hours 查询其他盘后资料

Inline mode

LICENSE

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published