mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-08 10:22:31 -05:00
[Core] Show custom message to the user if discord.py is missing
This commit is contained in:
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 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/
|
||||||
|
|||||||
Reference in New Issue
Block a user