mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
select error channel in config
This commit is contained in:
parent
05f342bf89
commit
f95f1f43f1
1 changed files with 3 additions and 4 deletions
|
@ -7,7 +7,6 @@ import sys
|
|||
import db
|
||||
import errors
|
||||
import youtube_dl
|
||||
import os
|
||||
|
||||
# Init the event loop
|
||||
import asyncio
|
||||
|
@ -109,7 +108,7 @@ async def find_user(user: discord.User):
|
|||
async def on_error(event, *args, **kwargs):
|
||||
type, exception, traceback = sys.exc_info()
|
||||
try:
|
||||
await client.send_message(client.get_channel("368447084518572034"), f"☢️ ERRORE CRITICO NELL'EVENTO `{event}`\n"
|
||||
await client.send_message(client.get_channel(config["Discord"]["main_channel"]), f"☢️ ERRORE CRITICO NELL'EVENTO `{event}`\n"
|
||||
f"Il bot si è chiuso e si dovrebbe riavviare entro qualche minuto.\n\n"
|
||||
f"Dettagli dell'errore:\n"
|
||||
f"```python\n"
|
||||
|
@ -340,9 +339,9 @@ async def update_users_pipe(users_connection):
|
|||
|
||||
async def update_music_queue():
|
||||
await client.wait_until_ready()
|
||||
while True:
|
||||
global voice_player
|
||||
global voice_playing
|
||||
while True:
|
||||
# Wait until there is nothing playing
|
||||
if voice_client is not None and voice_player is not None and (voice_player.is_playing() and not voice_player.is_done()):
|
||||
await asyncio.sleep(1)
|
||||
|
|
Loading…
Reference in a new issue