Fix bug where bot disconnects from voice channel before finishing the audio sequence.
This commit is contained in:
parent
db695b0805
commit
5c77a47383
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ from .ai import AIBot
|
|||
description = """BotBotBot"""
|
||||
|
||||
logger = logging.getLogger("botbotbot")
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
with open("config.toml", "rb") as config_file:
|
||||
config = tomllib.load(config_file)
|
||||
|
@ -234,7 +234,7 @@ async def voice_random_nicks(member, before, after):
|
|||
vo = await after.channel.connect()
|
||||
|
||||
await asyncio.sleep(random.randrange(10))
|
||||
vo.play(source)
|
||||
await vo.play(source, wait_finish=True)
|
||||
|
||||
await asyncio.sleep(random.randrange(60))
|
||||
await vo.disconnect()
|
||||
|
|
Loading…
Reference in a new issue