mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-18 15:52:10 +00:00
Poprawiono obsluge rotowanych logow i troche ulepszono funkcje
opowiadania o fabryczcce
This commit is contained in:
@@ -26,7 +26,7 @@ from spotify_dl import youtube as youtube_download
|
|||||||
import yt_dlp
|
import yt_dlp
|
||||||
from spotipy.oauth2 import SpotifyClientCredentials
|
from spotipy.oauth2 import SpotifyClientCredentials
|
||||||
import logging.handlers as handlers
|
import logging.handlers as handlers
|
||||||
|
import shutil
|
||||||
|
|
||||||
# *=========================================== Predefines
|
# *=========================================== Predefines
|
||||||
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
||||||
@@ -156,6 +156,8 @@ async def on_message(message):
|
|||||||
tdelta = tdelta.total_seconds()
|
tdelta = tdelta.total_seconds()
|
||||||
if "opowiedz o fabryczce" in message.content:
|
if "opowiedz o fabryczce" in message.content:
|
||||||
await message.reply(historia_fabryczki)
|
await message.reply(historia_fabryczki)
|
||||||
|
if "opowiedz mi o fabryczce" in message.content:
|
||||||
|
await message.reply(historia_fabryczki)
|
||||||
|
|
||||||
if tdelta > INITIAL_TIME_WAIT:
|
if tdelta > INITIAL_TIME_WAIT:
|
||||||
for word in word_reactions:
|
for word in word_reactions:
|
||||||
@@ -332,7 +334,10 @@ async def check():
|
|||||||
await asyncio.sleep(10)
|
await asyncio.sleep(10)
|
||||||
if not voiceClient.is_playing() and not voiceClient.is_paused():
|
if not voiceClient.is_playing() and not voiceClient.is_paused():
|
||||||
await play(MUZYKA["ctx"], MUZYKA["requestor"])
|
await play(MUZYKA["ctx"], MUZYKA["requestor"])
|
||||||
|
if os.path.getsize(logfile) > 600000:
|
||||||
|
shutil.copyfile(logfile,"/home/pi/RetroPie/logs/discord{}.log".format(datetime.now()))
|
||||||
|
logger.info("Log rollover")
|
||||||
|
handler.doRollover()
|
||||||
await asyncio.sleep(60)
|
await asyncio.sleep(60)
|
||||||
|
|
||||||
|
|
||||||
@@ -959,6 +964,10 @@ async def przytul(ctx, arg=None):
|
|||||||
async def get_image_stable_diffusion(ctx, arg=None):
|
async def get_image_stable_diffusion(ctx, arg=None):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@client.command()
|
||||||
|
async def fabryczka(ctx, arg=None):
|
||||||
|
await ctx.message.reply(historia_fabryczki)
|
||||||
|
|
||||||
|
|
||||||
# *================================== Run
|
# *================================== Run
|
||||||
client.run(TOKEN)
|
client.run(TOKEN)
|
||||||
|
|||||||
Reference in New Issue
Block a user