From 39eeedc5f9013c2cb04ac7a47a51f5764c5c3914 Mon Sep 17 00:00:00 2001 From: James H Date: Sat, 8 Apr 2023 00:52:45 +0100 Subject: [PATCH] Fix typing for py39 --- src/commands/audio.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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