This commit is contained in:
2024-04-09 01:43:35 +02:00
parent 660e2a264a
commit 0a85c6148e
+11 -2
View File
@@ -299,7 +299,7 @@ async def on_ready():
logger.debug("%s has connected to Discord!", client.user)
await client.change_presence(activity=discord.Game(name="Axe Throwing Darts"))
await client.tree.sync()
check_data.start()
check_self.start()
@client.event
@@ -679,10 +679,19 @@ async def check_music():
await play(MUZYKA["ctx"], MUZYKA["requester"])
await asyncio.sleep(2)
@tasks.loop(seconds=3)
# trunk-ignore(pylint/R0915)
async def check_data_q():
channel = client.get_channel(1062047367337095268)
try:
data = IN_COMM_Q.get(block=False)
await channel.send("O. A tak będzie wyglądało coś ciekawego w przyszłości: {data}")
except Empty:
pass
@tasks.loop(seconds=120)
# trunk-ignore(pylint/R0915)
async def check_data():
async def check_self():
"""
The function `check_data` periodically checks for conditions to send messages and manage log files
in a Discord channel.