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
羽波
羽波
MVP monorepo to rapidly develop scalable, reliable, high-quality components for Amazon Linux instance configuration management

Ansible Amazon Base Repository Ansible Amazon Base Repository About Setting Up Ansible Environment Configuring Python VENV and Ansible Editor Configur

Artem Veremey 1 Aug 06, 2022
Whatsapp-bot - Whatsapp chatbot build with python and twilio

Whatsapp-bot This is a Whatsapp Chatbot that responds with quotes, reply owners

arinzejustinng 1 Jan 14, 2022
The worst but simplest webhook bot for GitHub and Matrix.

gh-bot gh-bot is maybe the worst (but simplest) Matrix webhook bot for Github. Example of commits: Example of workflow finished: Setting up Server You

Jae Lo Presti 4 Aug 18, 2022
Messing around with GitHub API to look at omicron build times

gh-workflow-runs This is a very simple tool to dump out basic information about workflow runs for a GitHub repo. The structure is based on gh-subscrip

David Pacheco 1 Nov 30, 2021
Music bot because Octave is down and I can : )

Chords On a mission to build the best Discord Music Bot View Demo · Report Bug · Request Feature Table of Contents About The Project Built With Gettin

Aman Prakash Jha 53 Jan 07, 2023
Want to play What Would Rather on your Server? Invite the bot now!😏

What is this Bot? 👀 What You Would Rather? is a Guessing game where you guess one thing. Long Description short Take this example: You typed r!rather

丂ㄚ么乙ツ 2 Nov 17, 2021
A Telegram bot for personal utilities

Aqua Aqua is a Telegram bot for personal utilities. Installation Prerequisites: Install Poetry for managing dependencies and fork/clone the repository

Guilherme Vasconcelos 2 Mar 30, 2022
Sms-bomber - A Simple Browser Automated Bomber

A Simple Browser Automated Bomber which uses selenium :D Star the Repo and Follo

Terminal1337 9 Apr 11, 2022
:snake: Python SDK to query Scaleway APIs.

Scaleway SDK Python SDK to query Scaleway's APIs. Stable release: Development: Installation The package is available on pip. To install it in a virtua

Scaleway 114 Dec 11, 2022
ChannelActionsBot - Channel Actions Bot With Python

ChannelActionsBot Can be found on telegram as @ChannelActionsBot! Features Auto

Aditya 56 Dec 30, 2022
Unirest in Python: Simplified, lightweight HTTP client library.

Unirest for Python Unirest is a set of lightweight HTTP libraries available in multiple languages, built and maintained by Mashape, who also maintain

Kong 432 Dec 21, 2022
Stock Market Insights is a Dashboard that gives the 360 degree view of the particular company stock

fedora-easyfix A collection of self-contained and well-documented issues for newcomers to start contributing with How to setup the local development e

Ganesh N 3 Sep 10, 2021
Simple Telegram AI Chat bot made using OpenAI and Luna API

Yui Yui, is a simple telegram chat bot made using OpenAI and Luna Chat bot Deployment 👀 Deploying is easy 🤫 ! You can deploy this bot in Heroku or i

I'm Not A Bot #Left_TG 21 Dec 29, 2022
A bot that downloads all the necessary files from WeLearn and lists your assignments, filter due assignments, etc.

Welearn-bot This is a bot which lets you interact with WeLearn from the command line. It can Download all files/resources from your courses and organi

Parth Bibekar 17 Oct 19, 2022
Very Sempil Bot Auto Filter bot

SAMANTHA_BOT Very Sempil Bot Auto Filter bot ##[ # 𝐂𝐋𝐈𝐂𝐊 𝐁𝐄𝐋𝐎𝐖 𝐈𝐌𝐀𝐆𝐄 𝐓𝐎 𝐃𝐄𝐏𝐋𝐎𝐘 👇 👇 👇 Auto Filter Manuel Filter IMDB Admin Co

DARK WEBLOAD 3 Jun 27, 2022
News API consisting various sources from Tanzania

Tanzania News API News API consisting various sources from Tanzania. Fork the project Clone the project git clone https://github.com/username/news-a

Innocent Zenda 6 Oct 06, 2022
Roblox-Account-Gen - A simple account generator not using paid solving services

Roblox Account Generator Star this if it helped to spread awareness! No 2captcha

x 1 Feb 17, 2022
Baby Villager Bot

This script scrapes and stores the availability of timeslots for Car Driving Test at all RTA Serivce NSW centres in the state. Dependencies Account wi

Milo Weinberg 3 Dec 16, 2021
A Telegram Bot written in Python for mirroring files on the Internet to your Google Drive or Telegram

Original Repo mirror-leech-telegram-bot This is a Telegram Bot written in Python for mirroring files on the Internet to your Google Drive or Telegram.

0 Jan 03, 2022
This Instagram app created as a clone of instagram.Developed during Moringa Core.

Instagram This Instagram app created as a clone of instagram.Developed during Moringa Core. AUTHOR By: Nyagah Isaac Description This web-app allows a

Nyagah Isaac 1 Nov 01, 2021