yobot插件,Steam雷达,可自动播报玩家的Steam游戏状态和DOTA2图文战报

Overview

Steam_watcher

这是 prcbot/yobot 的自定义插件,可自动播报玩家的Steam游戏状态和DOTA2图文战报

都有些什么功能?

本插件可以在用户绑定后自动推送Steam游戏状态的更新和 Dota2 图文战报,以及提供一些手动查询功能

指令列表

atbot 表示需要@BOT

atsb 表示@某人

xxx yyy 等表示自定义参数

[] 方括号表示参数可以省略

Steam

负责Steam相关的功能

指令 说明
Steam帮助 查看帮助
订阅Steam 在本群开启Steam内容的推送
取消订阅Steam 在本群关闭Steam内容的推送
绑定Steam 好友代码 绑定Steam账号,一人一号
可直接覆盖绑定
解除绑定Steam 解除绑定Steam账号
xxx在干嘛 查询xxx的Steam游戏状态
查询xxx的天梯段位
查询xxx的常用英雄
查询xxx的英雄池

Whois

负责区分各个群的各位群友

指令0 说明
atbot 我是xxx 为自己增加一个别名xxx1
atbot 请叫我xxx 为自己增加一个别名xxx并设为默认2
atbot 我不是xxx 删除自己的别名xxx
atbot yyyxxx yyy增加一个别名xxx3
xxx是谁? 查询xxx的别名
xxx是不是yyy 比对xxxyyy的默认别名
查询群友 查询群内所有拥有别名的群友的默认别名

0 简单地说,涉及修改的指令需要 atbot,而查询的指令不需要

1, 2 一个人可以拥有多个别名,其中第一个是默认别名

3 yyy可以是atsb

使用方法

事前准备

Steam APIKEY

获取 Steam APIKEY

Steam APIKEY 的权限与其所属账号挂钩,要看到被观察者的游戏状态,需要满足以下两个条件之一

  • 被观察者的 Steam 隐私设置中游戏详情设置为 公开 ,且好友与聊天状态设置为在线
  • APIKEY 账号与被观察者为好友,被观察者的 Steam 隐私设置中游戏详情设置为 仅限好友 ,且好友与聊天状态设置为在线

条件不满足时,从 API 获取到的被观察者的游戏状态为空,即没在玩游戏

Linux

0. yobot 源码版

本插件基于 yobot 运行,所以首先需要 部署 yobot 源码版go-cqhttp,并保持两者同时运行

1. 下载本项目

# 在 ybplugins 目录下克隆本项目
cd yobot/src/client/ybplugins
git clone https://github.com/SonodaHanami/Steam_watcher

2. 安装依赖

cd Steam_watcher
pip3 install -r requirements.txt --user
# 国内可加上参数 -i https://pypi.tuna.tsinghua.edu.cn/simple

3. 导入

将 Steam_watcher 导入 yobot ,请参考 这个例子 修改 yobot.py

4. 填写配置文件

启动 yobot ,第一次启动 Steam_watcher 后会在 Steam_watcher 文件夹下自动生成 config.json,修改它

{
    "ADMIN": "123456789",   // 填写管理员的QQ号
    "BOT": "987654321",     // 填写BOT的QQ号
    "STEAM_APIKEY": ""      // 填写 Steam APIKEY
}

5. 应该可以了

重新启动 yobot ,开始使用

Windows

0. yobot 源码版

本插件基于 yobot 运行,所以首先需要 部署 yobot 源码版go-cqhttp,并保持两者同时运行

1. 下载本项目

推荐使用 Github Desktopyobot/src/client/ybplugins 目录下克隆本项目,后续更新可直接pull

下载源码(不推荐) 下载 https://github.com/SonodaHanami/Steam_watcher/archive/refs/heads/master.zip ,将整个 Steam_watcher 文件夹解压到 yobot/src/client/ybplugins 目录下

完成本步骤后,项目目录结构应该如下所示(仅列出本文档相关的关键文件/文件夹示意)

yobot
  └─src
      └─client
          ├─yobot.py
          └─ybplugins
              └─Steam_watcher
                  └─steam.py

2. 安装依赖

进入 Steam_watcher 文件夹,在空白处Shift+右键,点击“在此处打开 PowerShell 窗口”(或者命令提示符)

pip3 install -r requirements.txt --user
# 国内可加上参数 -i https://pypi.tuna.tsinghua.edu.cn/simple

3. 导入

将 Steam_watcher 导入 yobot ,请参考 这个例子 修改 yobot.py

4. 填写配置文件

启动 yobot ,第一次启动 Steam_watcher 后会在 Steam_watcher 文件夹下自动生成 config.json,修改它

{
    "ADMIN": "123456789",   // 填写管理员的QQ号
    "BOT": "987654321",     // 填写BOT的QQ号
    "STEAM_APIKEY": ""      // 填写 Steam APIKEY
}

5. 应该可以了

重新启动 yobot ,开始使用

开始使用

1. 订阅Steam

在群内发送“订阅Steam”,开启Steam内容的推送

2. 成为群友

在群内发送“atbot 我是xxx”,为自己添加一个别名

为什么需要这样做? 这样做的目的是隔离。因为bot可以加入多个群,同一个人也可以同时在不同的的群里,但是同一个人的推送不一定要发到所有群
bot仅向每个群里发送绑定了Steam的群友的推送。
举个例子:
有A和B两个群,两个群里都有枫哥、甲哥、翔哥和bot,枫哥、甲哥和翔哥各自都绑定了Steam
A群的群友有枫哥和甲哥
B群的群友有枫哥和翔哥
则bot会向A群发送枫哥和甲哥的推送,向B群发送枫哥和翔哥的推送
或者说,枫哥的推送会被bot发送到A和B两个群,甲哥的推送只会被bot发送到A群,翔哥的推送只会被bot发送到B群

3. 绑定Steam

在群内发送“绑定Steam 好友代码”,绑定自己的Steam号

4. 试一下

在群内发送“xxx是谁?”,bot将回复xxx的别名

在群内发送“查询群友”,bot将回复该群的群友列表

在群内发送“xxx在干嘛”,bot将回复xxx的Steam游戏状态

Owner
羽波
羽波
Crypto-trading-simulator - Cryptocurrency trading simulator using Python, Streamlit

Crypto Trading Simulator Run streamlit run main.py Dependency Python 3 streamli

Brad 12 Jul 02, 2022
Azure Neural Speech Service TTS

Written in Python using the Azure Speech SDK. App.py provides an easy way to create an Text-To-Speech request to Azure Speech and download the wav file.

Rodney 1 Oct 11, 2021
A Python module for communicating with the Twilio API and generating TwiML.

twilio-python The default branch name for this repository has been changed to main as of 07/27/2020. Documentation The documentation for the Twilio AP

Twilio 1.6k Jan 05, 2023
Probably Overengineered Unimore Booker

POUB Probably Overengineered Unimore Booker A python-powered, actor-based, telegram-facing, timetable-aware booker for unimore (if you know more adjec

Lorenzo Rossi 3 Feb 20, 2022
Dashbot is an application for showing the trade in U.S. Trade Market

Dashbot is an application for showing the trade in U.S. Trade Market (e.g., 4:00am to 8:00pm Eastern Time for the US market using Intraday data using Mercury..

Ahmed Nabil 2 Jan 27, 2022
GitHub Actions Poll Mode AutoScaler (GAPMAS)

GitHub Actions Poll Mode AutoScaler, or GAPMAS, is a simple tool that helps you run ephemeral GitHub Actions self-hosted runners on your own infrastructure.

Frode Nordahl 4 Nov 04, 2022
A Discord token stealer app written in Python 3.

Discord Token Stealer A Discord token stealer app written in Python 3. This version of the grabber only supports Windows. Features No local caching Tr

cankat 45 Jan 03, 2023
Moderation and Utility Discord bot.

Qrista An advanced Moderation and Utility Discord bot. Features Uses Hikari and Lightbulb as a command handler Advance Logging & Whole new enviroment

Blaze Camp 2 Jan 11, 2022
this synchronizes my appearances with my calendar

Josh's Schedule Synchronizer Here's the "problem:" I use a spreadsheet to maintain all my public appearances. I check the spreadsheet as often as poss

Josh Long 2 Oct 18, 2021
Python script to Funge NFTs.

Python script to Funge NFTs. It scrapes OpenSea for a given list of NFT collections and downloads a certain number of NFTs from each collection or the entire collections.

3 Apr 28, 2022
PYAW allows you to call assembly from python

PYAW allows you to call assembly from python

2 Dec 13, 2021
BroBot's files, code and tester.

README - BroBOT Made by Rohan Chaturvedi [email protected] DISCLAIMER: Th

1 Jan 09, 2022
A Python module for communicating with the Twilio API and generating TwiML.

twilio-python The default branch name for this repository has been changed to main as of 07/27/2020. Documentation The documentation for the Twilio AP

Twilio 1.6k Jan 05, 2023
A Telegram robot can clone medias from any chat to your own chat.

Clonebot A Telegram robot can clone medias from any chat to your own chat. Read the documentation to know how to use the bot Deploy Developer Document

Renjith Mangal 224 Dec 30, 2022
Free and Open Source Machine Translation API. 100% self-hosted, no limits, no ties to proprietary services. Built on top of Argos Translate.

LibreTranslate Try it online! | API Docs Free and Open Source Machine Translation API, entirely self-hosted. Unlike other APIs, it doesn't rely on pro

UAV4GEO 3.5k Jan 03, 2023
Pinopoly is a tool to remove the "banker" player and replace them with a digitalized system

Pinopoly is a tool to remove the "banker" player and replace them with a digitalized system. It is intended to be used on a Raspberry Pi but can be used in the command line as well.

Alex Overstreet 11 Jul 09, 2022
Projeto do segundo módulo da Resilia

@ Projeto Resilia : Módulo 2 Vamos jogar Forca ! O jogo da forca é um jogo em que o jogador tem que acertar qual é a palavra proposta, tendo como dica

Mateus Sartorio 2 Feb 24, 2022
Twitter for Python!

Tweepy: Twitter for Python! Installation The easiest way to install the latest version from PyPI is by using pip: pip install tweepy You can also use

9.4k Jan 07, 2023
A very tiny python api for the stock exchange tradegate.de

pytradegate A very tiny python api for the stock exchange tradegate.de The api provides the recent ask/bid data and all other data as found on the det

dunderstr aka seimen 7 Aug 24, 2022
Easy & powerful bot to check if your all Telegram bots are working or not

Easy & powerful bot to check if your all Telegram bots are working or not. This bot status bot updates every 105 minutes & runs for 24x7 hours.

35 Dec 30, 2022