Skip to content

Commit

Permalink
[V3 CLI] CLI prefix args correctly display in the on_ready print (#1770)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael H authored and tekulvw committed Jun 2, 2018
1 parent a6965c4 commit 741f3cb
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions redbot/core/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async def on_ready():
else:
invite_url = None

prefixes = await bot.db.prefix()
prefixes = cli_flags.prefix or (await bot.db.prefix())
lang = await bot.db.locale()
red_version = __version__
red_pkg = pkg_resources.get_distribution("Red-DiscordBot")
Expand All @@ -118,24 +118,24 @@ async def on_ready():

INFO.append("{} cogs with {} commands".format(len(bot.cogs), len(bot.commands)))

async with aiohttp.ClientSession() as session:
async with session.get("https://pypi.python.org/pypi/red-discordbot/json") as r:
data = await r.json()
if StrictVersion(data["info"]["version"]) > StrictVersion(red_version):
INFO.append(
"Outdated version! {} is available "
"but you're using {}".format(data["info"]["version"], red_version)
)
owner = discord.utils.get(bot.get_all_members(), id=bot.owner_id)
try:
try:
async with aiohttp.ClientSession() as session:
async with session.get("https://pypi.python.org/pypi/red-discordbot/json") as r:
data = await r.json()
if StrictVersion(data["info"]["version"]) > StrictVersion(red_version):
INFO.append(
"Outdated version! {} is available "
"but you're using {}".format(data["info"]["version"], red_version)
)
owner = discord.utils.get(bot.get_all_members(), id=bot.owner_id)
await owner.send(
"Your Red instance is out of date! {} is the current "
"version, however you are using {}!".format(
data["info"]["version"], red_version
)
)
except:
pass
except:
pass
INFO2 = []

sentry = await bot.db.enable_sentry()
Expand Down

0 comments on commit 741f3cb

Please sign in to comment.