1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Fix steampowered commands

This commit is contained in:
Steffo 2020-05-28 16:54:43 +02:00
parent 4a2dc9c73e
commit f20c106a57
Signed by: steffo
GPG key ID: 896A80F55F7C97F0
2 changed files with 5 additions and 4 deletions

View file

@ -1,5 +1,5 @@
from typing import *
import steam
import steam.webapi
import requests.exceptions
import royalnet.commands as rc
import royalnet.utils as ru
@ -57,7 +57,7 @@ class SteammatchCommand(rc.Command):
super().__init__(interface)
if "Steam" not in self.config or "web_api_key" not in self.config["Steam"]:
raise rc.ConfigurationError("[c]Steam.web_api_key[/c] config option is missing!")
self._api = steam.WebAPI(self.config["Steam"]["web_api_key"])
self._api = steam.webapi.WebAPI(self.config["Steam"]["web_api_key"])
async def run(self, args: rc.CommandArgs, data: rc.CommandData) -> None:
users = []

View file

@ -1,5 +1,6 @@
from typing import *
import steam
import steam.steamid
import steam.webapi
import datetime
import royalnet.commands as rc
import royalnet.utils as ru
@ -18,7 +19,7 @@ class SteampoweredCommand(rc.Command):
super().__init__(interface)
if "Steam" not in self.config or "web_api_key" not in self.config["Steam"]:
raise rc.ConfigurationError("[c]Steam.web_api_key[/c] config option is missing!")
self._api = steam.WebAPI(self.config["Steam"]["web_api_key"])
self._api = steam.webapi.WebAPI(self.config["Steam"]["web_api_key"])
@staticmethod
def _display(account: Steam):