def get_versions(): versions = cass.get_versions(region="NA") print(versions[0]) print(versions.region) versions = cass.get_versions(region="NA") print(versions[0]) realms = cass.get_realms(region="NA") print(realms.latest_versions)
def test_versions(): versions = cass.get_versions(region="NA") versions[0] versions.region versions = cass.get_versions(region="NA") versions[0]
from cassiopeia import Queue from discord.ext import commands from riotwatcher import RiotWatcher from requests import HTTPError bot = commands.Bot( command_prefix=("!", "@LeagueBot"), description='Bot for League of Legends') champion_gg_api_key = config.championGGAPI kass.set_riot_api_key(config.riotAPI) watcher = RiotWatcher(config.riotAPI) all_champions = kass.Champions(region="NA") latestLeaguePatch = kass.get_versions(region="NA") #StoreMatches.populateTables() # Shows when bot is ready @bot.event async def on_ready(): print('Logged in as ' + bot.user.name) # Simple hello command @bot.command() async def hello(): await bot.say('Hello!')
def newPatch(): currLeaguePatch = kass.get_versions(region="NA") newPatch = False if currLeaguePatch[0] != latestLeaguePatch[0]: newPatch = True return newPatch