Spaces:
Runtime error
Runtime error
File size: 486 Bytes
acd2163 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | import os
import re
import traceback
Directory = os.path.dirname(os.path.realpath(__file__))
def load(bot):
Failed = []
for Extension in [
"cogs." + re.sub(".py", "", File)
for File in os.listdir(Directory)
if not "__" in File
]:
try:
bot.load_extension(Extension)
except:
traceback.print_exc()
Failed.append(f"{Extension}.py ์์ ์ค๋ฅ ๋ฐ์\n\n{traceback.print_exc()}")
return Failed
|