mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-16 06:42:10 +00:00
Test 8
This commit is contained in:
@@ -162,7 +162,6 @@ logger.addHandler(handler)
|
|||||||
random.seed()
|
random.seed()
|
||||||
logger.debug(platform)
|
logger.debug(platform)
|
||||||
logger.info("Playlist generation")
|
logger.info("Playlist generation")
|
||||||
|
|
||||||
# *=========================================== Load Data files
|
# *=========================================== Load Data files
|
||||||
music_file_list = []
|
music_file_list = []
|
||||||
try:
|
try:
|
||||||
@@ -176,28 +175,43 @@ except:
|
|||||||
temp_music_file = temp_music_file.replace("/", "\\")
|
temp_music_file = temp_music_file.replace("/", "\\")
|
||||||
music_file_list.append(temp_music_file)
|
music_file_list.append(temp_music_file)
|
||||||
logger.error("Service Unavailable")
|
logger.error("Service Unavailable")
|
||||||
|
logger.info("Playlist generation done")
|
||||||
|
|
||||||
|
logger.info("Loading GPT settings")
|
||||||
with open(SYSTEM_GPT_SETTINGS, "r+", encoding=ENCODING) as temp_settings_file:
|
with open(SYSTEM_GPT_SETTINGS, "r+", encoding=ENCODING) as temp_settings_file:
|
||||||
# First we load existing data into a dict.
|
# First we load existing data into a dict.
|
||||||
GPT_SETTINGS = json.load(temp_settings_file)
|
GPT_SETTINGS = json.load(temp_settings_file)
|
||||||
|
logger.info("Done")
|
||||||
|
|
||||||
|
logger.info("Loading memory file")
|
||||||
with open(MEMORY_FIVE_SIARA, "r+", encoding=ENCODING) as temp_memory_file:
|
with open(MEMORY_FIVE_SIARA, "r+", encoding=ENCODING) as temp_memory_file:
|
||||||
# First we load existing data into a dict.
|
# First we load existing data into a dict.
|
||||||
MESSAGE_TABLE = json.load(temp_memory_file)
|
MESSAGE_TABLE = json.load(temp_memory_file)
|
||||||
|
logger.info("Done")
|
||||||
|
|
||||||
|
logger.info("Loading music memory file")
|
||||||
with open(MEMORY_FIVE_MUZYKA, "r+", encoding=ENCODING) as temp_music_memory_file:
|
with open(MEMORY_FIVE_MUZYKA, "r+", encoding=ENCODING) as temp_music_memory_file:
|
||||||
# First we load existing data into a dict.
|
# First we load existing data into a dict.
|
||||||
message_table_muzyka = json.load(temp_music_memory_file)
|
message_table_muzyka = json.load(temp_music_memory_file)
|
||||||
|
logger.info("Done")
|
||||||
|
|
||||||
|
logger.info("Loading settings file")
|
||||||
with open(SETTINGS_FILE, "r", encoding=ENCODING) as f_settings_file:
|
with open(SETTINGS_FILE, "r", encoding=ENCODING) as f_settings_file:
|
||||||
data = json.load(f_settings_file)
|
data = json.load(f_settings_file)
|
||||||
|
logger.info("Done")
|
||||||
|
|
||||||
|
logger.info("Loading reactions")
|
||||||
word_reactions = data["word_reactions"]
|
word_reactions = data["word_reactions"]
|
||||||
cyclic_words = data["cyclic_words"]
|
cyclic_words = data["cyclic_words"]
|
||||||
historia_fabryczki = data["fabryczka"]
|
historia_fabryczki = data["fabryczka"]
|
||||||
for key in word_reactions:
|
for key in word_reactions:
|
||||||
word_reactions[key][2] = datetime.now()
|
word_reactions[key][2] = datetime.now()
|
||||||
|
logger.info("Done")
|
||||||
|
|
||||||
# *=========================================== Create Client
|
# *=========================================== Create Client
|
||||||
|
logger.info("Creating discord bot")
|
||||||
client = commands.Bot(intents=intents, command_prefix="$")
|
client = commands.Bot(intents=intents, command_prefix="$")
|
||||||
|
logger.info("Done")
|
||||||
# *=========================================== Define Events
|
# *=========================================== Define Events
|
||||||
|
|
||||||
|
|
||||||
@@ -1798,4 +1812,5 @@ async def parametry_muzyki_mego_ludu(
|
|||||||
|
|
||||||
|
|
||||||
# *================================== Run
|
# *================================== Run
|
||||||
|
logger.info("Starting discord bot")
|
||||||
client.run(TOKEN)
|
client.run(TOKEN)
|
||||||
|
|||||||
Reference in New Issue
Block a user