[Core] Show custom message to the user if discord.py is missing

This commit is contained in:
Twentysix 2016-11-08 04:46:54 +01:00
parent 3a51eeca65
commit c4b1c01a9f

19
red.py
View File

@ -1,8 +1,3 @@
from discord.ext import commands
import discord
from cogs.utils.settings import Settings
from cogs.utils.dataIO import dataIO
from cogs.utils.chat_formatting import inline
import asyncio import asyncio
import os import os
import time import time
@ -12,6 +7,20 @@ import logging.handlers
import shutil import shutil
import traceback import traceback
try:
from discord.ext import commands
import discord
except ImportError:
print("Discord.py is not installed.\n"
"Consult the guide for your operating system "
"and do ALL the steps in order.\n"
"https://twentysix26.github.io/Red-Docs/\n")
sys.exit()
from cogs.utils.settings import Settings
from cogs.utils.dataIO import dataIO
from cogs.utils.chat_formatting import inline
# #
# Red, a Discord bot by Twentysix, based on discord.py and its command extension # Red, a Discord bot by Twentysix, based on discord.py and its command extension
# https://github.com/Twentysix26/ # https://github.com/Twentysix26/