mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
Fix steampowered commands
This commit is contained in:
parent
4a2dc9c73e
commit
f20c106a57
2 changed files with 5 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
from typing import *
|
from typing import *
|
||||||
import steam
|
import steam.webapi
|
||||||
import requests.exceptions
|
import requests.exceptions
|
||||||
import royalnet.commands as rc
|
import royalnet.commands as rc
|
||||||
import royalnet.utils as ru
|
import royalnet.utils as ru
|
||||||
|
@ -57,7 +57,7 @@ class SteammatchCommand(rc.Command):
|
||||||
super().__init__(interface)
|
super().__init__(interface)
|
||||||
if "Steam" not in self.config or "web_api_key" not in self.config["Steam"]:
|
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!")
|
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:
|
async def run(self, args: rc.CommandArgs, data: rc.CommandData) -> None:
|
||||||
users = []
|
users = []
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from typing import *
|
from typing import *
|
||||||
import steam
|
import steam.steamid
|
||||||
|
import steam.webapi
|
||||||
import datetime
|
import datetime
|
||||||
import royalnet.commands as rc
|
import royalnet.commands as rc
|
||||||
import royalnet.utils as ru
|
import royalnet.utils as ru
|
||||||
|
@ -18,7 +19,7 @@ class SteampoweredCommand(rc.Command):
|
||||||
super().__init__(interface)
|
super().__init__(interface)
|
||||||
if "Steam" not in self.config or "web_api_key" not in self.config["Steam"]:
|
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!")
|
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
|
@staticmethod
|
||||||
def _display(account: Steam):
|
def _display(account: Steam):
|
||||||
|
|
Loading…
Reference in a new issue