mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Core] Show custom message to the user if discord.py is missing
This commit is contained in:
parent
3a51eeca65
commit
c4b1c01a9f
19
red.py
19
red.py
@ -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 os
|
||||
import time
|
||||
@ -12,6 +7,20 @@ import logging.handlers
|
||||
import shutil
|
||||
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
|
||||
# https://github.com/Twentysix26/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user