Skip to content

Commit

Permalink
fix: resolve pyright issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ooliver1 committed Oct 25, 2022
1 parent 19e8606 commit ee908b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
14 changes: 10 additions & 4 deletions mafic/__libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,19 @@
VoiceServerUpdate as VoiceServerUpdatePayload,
)
elif library == "disnake":
from typing import TypedDict

from disnake import Client, Guild, StageChannel, VoiceChannel, VoiceProtocol
from disnake.abc import Connectable, GuildChannel
from disnake.backoff import ExponentialBackoff
from disnake.types.voice import (
GuildVoiceState as GuildVoiceStatePayload,
VoiceServerUpdate as VoiceServerUpdatePayload,
)
from disnake.types.snowflake import Snowflake
from disnake.types.voice import GuildVoiceState as GuildVoiceStatePayload

class VoiceServerUpdatePayload(TypedDict):
token: str
guild_id: Snowflake
endpoint: str | None

else:
from discord import Client, Guild, StageChannel, VoiceChannel, VoiceProtocol
from discord.abc import Connectable, GuildChannel
Expand Down
14 changes: 0 additions & 14 deletions mafic/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,6 @@


class Player(VoiceProtocol):
__slots__ = (
"_connected",
"_guild_id",
"_last_update",
"_node",
"_ping",
"_position",
"_server_state",
"_session_id",
"channel",
"client",
"guild",
)

def __init__(
self,
client: Client,
Expand Down

0 comments on commit ee908b2

Please sign in to comment.