add rwf command

This commit is contained in:
Lukas 2022-03-20 23:38:54 +01:00
parent a22905f689
commit d4922f8772
4 changed files with 42 additions and 17 deletions

2
.gitignore vendored
View File

@ -141,3 +141,5 @@ cython_debug/
# Pycharm # Pycharm
.idea/ .idea/
prod.toml
log/

View File

@ -7,6 +7,7 @@ name = "pypi"
ts3 = "*" ts3 = "*"
pycoingecko = "*" pycoingecko = "*"
toml = "*" toml = "*"
requests = "*"
[dev-packages] [dev-packages]

34
Pipfile.lock generated
View File

@ -1,7 +1,7 @@
{ {
"_meta": { "_meta": {
"hash": { "hash": {
"sha256": "d9f13c4341b606a12b8b0ef95f6bce67911d3f7866a6c4552c342c4a5ae15fdf" "sha256": "31ecf8cb0f57cd41d5c094347ce8878eddd6f611790259ee671f31d6620a1bee"
}, },
"pipfile-spec": 6, "pipfile-spec": 6,
"requires": { "requires": {
@ -18,26 +18,26 @@
"default": { "default": {
"certifi": { "certifi": {
"hashes": [ "hashes": [
"sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee", "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872",
"sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8" "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569"
], ],
"version": "==2021.5.30" "version": "==2021.10.8"
}, },
"charset-normalizer": { "charset-normalizer": {
"hashes": [ "hashes": [
"sha256:5d209c0a931f215cee683b6445e2d77677e7e75e159f78def0db09d68fafcaa6", "sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597",
"sha256:5ec46d183433dcbd0ab716f2d7f29d8dee50505b3fdb40c6b985c7c4f5a3591f" "sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df"
], ],
"markers": "python_version >= '3'", "markers": "python_version >= '3'",
"version": "==2.0.6" "version": "==2.0.12"
}, },
"idna": { "idna": {
"hashes": [ "hashes": [
"sha256:14475042e284991034cb48e06f6851428fb14c4dc953acd9be9a5e95c7b6dd7a", "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff",
"sha256:467fbad99067910785144ce333826c71fb0e63a425657295239737f7ecd125f3" "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"
], ],
"markers": "python_version >= '3'", "markers": "python_version >= '3'",
"version": "==3.2" "version": "==3.3"
}, },
"pycoingecko": { "pycoingecko": {
"hashes": [ "hashes": [
@ -49,11 +49,11 @@
}, },
"requests": { "requests": {
"hashes": [ "hashes": [
"sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24", "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61",
"sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7" "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"
], ],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", "index": "pypi",
"version": "==2.26.0" "version": "==2.27.1"
}, },
"toml": { "toml": {
"hashes": [ "hashes": [
@ -73,11 +73,11 @@
}, },
"urllib3": { "urllib3": {
"hashes": [ "hashes": [
"sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece", "sha256:44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14",
"sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844" "sha256:aabaf16477806a5e1dd19aa41f8c2b7950dd3c746362d7e3223dbe6de6ac448e"
], ],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'",
"version": "==1.26.7" "version": "==1.26.9"
} }
}, },
"develop": {} "develop": {}

View File

@ -17,6 +17,7 @@ import inspect
# Custom # Custom
import ts3 import ts3
import requests
# Self # Self
from src import util from src import util
@ -194,6 +195,27 @@ def rename(self, invkr_id, parameter):
self.bot.clientupdate(client_nickname=self.nickname) self.bot.clientupdate(client_nickname=self.nickname)
def rwf(self):
url = "https://raider.io/api/v1/raiding/progression?raid=sepulcher-of-the-first-ones&difficulty=mythic&region=world"
data = json.loads(requests.get(url).text)
prog_done = 0
for entry in data['progression']:
if entry['totalGuilds'] > 0:
prog_done += 1
prog_min = prog_done
prog_max = len(data['progression'])
channelname = f"Sepulcher {prog_min}/{prog_max}"
print(channelname)
exit()
try:
self.editChannelname(200, channelname)
except ts3.query.TS3QueryError:
pass
def ticker(self, parameter): def ticker(self, parameter):
""" """
Refresh the Crypto Ticker channels, Refresh the Crypto Ticker channels,