diff --git a/src/commands/audio.py b/src/commands/audio.py index 97c5116..fedf876 100644 --- a/src/commands/audio.py +++ b/src/commands/audio.py @@ -6,6 +6,8 @@ import random import time import yt_dlp +from typing import Optional + from commands.command import Command # Taken from https://github.com/Rapptz/discord.py/blob/master/examples/basic_voice.py @@ -32,7 +34,7 @@ ffmpeg_options = { ytdl = yt_dlp.YoutubeDL(ytdl_format_options) -def get_channel_connection(connections: list, channel_id: int) -> dict | None: +def get_channel_connection(connections: list, channel_id: int) -> Optional[dict]: for connection in connections: if connection['id'] == channel_id: return connection