Fix typing for py39
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user