mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-09 20:58:54 -05:00
[Core] Removed outdated error checks
This commit is contained in:
parent
c645709dea
commit
36216a4058
18
red.py
18
red.py
@ -180,16 +180,16 @@ def user_allowed(message):
|
|||||||
async def get_oauth_url():
|
async def get_oauth_url():
|
||||||
try:
|
try:
|
||||||
data = await bot.application_info()
|
data = await bot.application_info()
|
||||||
except AttributeError:
|
except Exception as e:
|
||||||
return "Your discord.py is outdated. Couldn't retrieve invite link."
|
return "Couldn't retrieve invite link.Error: {}".format(e)
|
||||||
return discord.utils.oauth_url(data.id)
|
return discord.utils.oauth_url(data.id)
|
||||||
|
|
||||||
async def set_bot_owner():
|
async def set_bot_owner():
|
||||||
try:
|
try:
|
||||||
data = await bot.application_info()
|
data = await bot.application_info()
|
||||||
settings.owner = data.owner.id
|
settings.owner = data.owner.id
|
||||||
except AttributeError:
|
except Exception as e:
|
||||||
print("Your discord.py is outdated. Couldn't retrieve owner's ID.")
|
print("Couldn't retrieve owner's ID. Error: {}".format(e))
|
||||||
return
|
return
|
||||||
print("{} has been recognized and set as owner.".format(data.owner.name))
|
print("{} has been recognized and set as owner.".format(data.owner.name))
|
||||||
|
|
||||||
@ -424,15 +424,7 @@ def main():
|
|||||||
"discord.py@master#egg=discord.py[voice]")
|
"discord.py@master#egg=discord.py[voice]")
|
||||||
print("Official server: https://discord.me/Red-DiscordBot")
|
print("Official server: https://discord.me/Red-DiscordBot")
|
||||||
if settings.login_type == "token":
|
if settings.login_type == "token":
|
||||||
try:
|
yield from bot.login(settings.email)
|
||||||
yield from bot.login(settings.email)
|
|
||||||
except TypeError as e:
|
|
||||||
print(e)
|
|
||||||
msg = ("\nYou are using an outdated discord.py.\n"
|
|
||||||
"update your discord.py with by running this in your cmd "
|
|
||||||
"prompt/terminal.\npip3 install --upgrade git+https://"
|
|
||||||
"github.com/Rapptz/discord.py@async")
|
|
||||||
sys.exit(msg)
|
|
||||||
else:
|
else:
|
||||||
yield from bot.login(settings.email, settings.password)
|
yield from bot.login(settings.email, settings.password)
|
||||||
yield from bot.connect()
|
yield from bot.connect()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user