mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 09:22:31 -05:00
[V3 Info] Don't rely on redirect (#1581)
* [V3 Info] Don't rely on redirect Http -> Https * Update core_commands.py Use existing variable instead of new string * Update events.py Remove redirect, url only reference
This commit is contained in:
@@ -72,7 +72,7 @@ class Core:
|
|||||||
owner = app_info.owner
|
owner = app_info.owner
|
||||||
|
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.get("http://pypi.python.org/pypi/red-discordbot/json") as r:
|
async with session.get('{}/json'.format(red_pypi)) as r:
|
||||||
data = await r.json()
|
data = await r.json()
|
||||||
outdated = StrictVersion(data["info"]["version"]) > StrictVersion(__version__)
|
outdated = StrictVersion(data["info"]["version"]) > StrictVersion(__version__)
|
||||||
about = (
|
about = (
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ def init_events(bot, cli_flags):
|
|||||||
INFO.append('{} cogs with {} commands'.format(len(bot.cogs), len(bot.commands)))
|
INFO.append('{} cogs with {} commands'.format(len(bot.cogs), len(bot.commands)))
|
||||||
|
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.get("http://pypi.python.org/pypi/red-discordbot/json") as r:
|
async with session.get("https://pypi.python.org/pypi/red-discordbot/json") as r:
|
||||||
data = await r.json()
|
data = await r.json()
|
||||||
if StrictVersion(data["info"]["version"]) > StrictVersion(red_version):
|
if StrictVersion(data["info"]["version"]) > StrictVersion(red_version):
|
||||||
INFO.append(
|
INFO.append(
|
||||||
|
|||||||
Reference in New Issue
Block a user