botcasino 是基于 Telegram 机器人的红包机器人。自从**禁止加密货币与法币的交易后,**越来越多的加密货币玩家开始使用Telegram聊天。但是Telegram一直没有发红包功能,对于习惯使用QQ和微信的朋友来说,确实是一个遗憾。botcasino 正是为了解决这个问题而被创造出来。由于加密货币的价格不够稳定,在支付或交易的过程中会有很多不方便的地方。所有 botcasino 选择了比特股系统内的智能货币 BitCNY/BitUSD 作为红包的基础货币。
请在 Telegram 中 @luck_money_bot,或者打开 http://telegram.me/luck_money_bot 体验吧。
git clone https://github.com/zhangpanyi/botcasino.git
glide install
botcasino 服务使用了 Webhook 的方式接收机器人消息更新。所有必须准备一个域名,并解析到运行 botcasino 的服务器上。
cd certs
openssl genrsa -out server.key 2048
openssl ecparam -genkey -name secp384r1 -out server.key
openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 -subj "/C=US/ST=New York/L=Brooklyn/O=Brooklyn Company/CN=YOURDOMAIN"
注意: 请将 YOURDOMAIN 修改为你自己的域名。
botcasino 服务使用 MySQL 数据库存储操作记录,请预先准备 MySQL 数据库。
- 创建一个新的数据库。数据库名为
casino_logs
,字符集为utf8mb4 -- UTF-8 Unicode
。 - 将
mysql/casino_logs.sql
导入到这个数据库中。
钱包服务的作用是监控机器人的比特股钱包。如果有人转账到机器人的比特股钱包它就会通知 botcasino,用户的提现申请 botcasino 也是通过钱包服务去处理的,它们之间通过 gRPC 进行交流。
git clone https://github.com/zhangpanyi/btsmonitor.git
请按照说明文档启动钱包服务。
dynamic.yml
是动态配置文件,可在服务运行期间修改生效,使用默认配置就可以了。master.yml
是服务的基本配置文件,启动服务前必须将domain
、token
、mysql
字段改为自己的配置。domain
字段请使用www.google.com
格式,不要使用https://www.google.com/
格式。
go build
./botcasino