Move data files from config/ to data/
This commit is contained in:
@@ -34,7 +34,6 @@ class Anime(commands.Cog):
|
|||||||
"""
|
"""
|
||||||
Sends a random picture or gif of an Anime girl
|
Sends a random picture or gif of an Anime girl
|
||||||
"""
|
"""
|
||||||
# config/media.py
|
|
||||||
girl = name.capitalize()
|
girl = name.capitalize()
|
||||||
|
|
||||||
if girl == "List":
|
if girl == "List":
|
||||||
|
|||||||
@@ -8,10 +8,9 @@ loadconfig.py then gets called in aquabot.py
|
|||||||
# IMPORTS
|
# IMPORTS
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
# Variable Gathering
|
|
||||||
__avatar_old__ = "https://i.imgur.com/mskM9dH.png"
|
|
||||||
__avatar__ = "https://i.redd.it/0uajctrps9u41.jpg"
|
__avatar__ = "https://i.redd.it/0uajctrps9u41.jpg"
|
||||||
|
|
||||||
|
# Import from yaml
|
||||||
try:
|
try:
|
||||||
with open("config/config.yml") as file:
|
with open("config/config.yml") as file:
|
||||||
config = yaml.safe_load(file)
|
config = yaml.safe_load(file)
|
||||||
@@ -24,10 +23,11 @@ except yaml.YAMLError as error:
|
|||||||
except FileNotFoundError as error:
|
except FileNotFoundError as error:
|
||||||
print(f"Error, please create a config file: {error}")
|
print(f"Error, please create a config file: {error}")
|
||||||
|
|
||||||
|
# Import from *.py in config/ and data/
|
||||||
try:
|
try:
|
||||||
from config.cogs import __cogs__
|
from config.cogs import __cogs__
|
||||||
from config.status import __activity__
|
|
||||||
from config.media import __media_anime__, __media_girl__
|
from data.media import __media_anime__, __media_girl__
|
||||||
from config.memes import __memes_list__
|
from data.memes import __memes_list__
|
||||||
except ImportError as error:
|
except ImportError as error:
|
||||||
print(f"Error while importing: {error}")
|
print(f"Error while importing: {error}")
|
||||||
|
|||||||
Reference in New Issue
Block a user