fix(extra/transcript): update for youtube_transcript_api
This commit is contained in:
8
extra.py
8
extra.py
@@ -24,21 +24,21 @@ async def transcript(
|
||||
await message.channel.send("(autogenerated)")
|
||||
|
||||
messages = []
|
||||
for line in transcript:
|
||||
for line in transcript.snippets:
|
||||
if (
|
||||
players[message.guild.id].current.player.original.progress
|
||||
>= line["start"] + line["duration"]
|
||||
>= line.start + line.duration
|
||||
):
|
||||
continue
|
||||
|
||||
while (
|
||||
players[message.guild.id].current.player.original.progress < line["start"]
|
||||
players[message.guild.id].current.player.original.progress < line.start
|
||||
):
|
||||
await asyncio.sleep(0.2)
|
||||
|
||||
messages.insert(
|
||||
0,
|
||||
await message.channel.send(line["text"].upper() if upper else line["text"]),
|
||||
await message.channel.send(line.text.upper() if upper else line.text),
|
||||
)
|
||||
if len(messages) > max_messages:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user