File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
interactions/models/internal Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 99from interactions .client .const import MISSING
1010from interactions .client .errors import VoiceAlreadyConnected , VoiceConnectionTimeout
1111from interactions .client .utils import optional
12+ from interactions .models .discord .enums import Intents
1213from interactions .models .discord .snowflake import Snowflake_Type , to_snowflake
1314from interactions .models .discord .voice_state import VoiceState
1415
@@ -140,6 +141,9 @@ async def connect(self, timeout: int = 5) -> None:
140141 if self .connected :
141142 raise VoiceAlreadyConnected
142143
144+ if Intents .GUILD_VOICE_STATES not in self ._client .intents :
145+ raise RuntimeError ("Cannot connect to voice without the GUILD_VOICE_STATES intent." )
146+
143147 tasks = [
144148 asyncio .create_task (
145149 self ._client .wait_for ("raw_voice_state_update" , self ._guild_predicate , timeout = timeout )
@@ -154,7 +158,7 @@ async def connect(self, timeout: int = 5) -> None:
154158 self .logger .debug ("Waiting for voice connection data..." )
155159
156160 try :
157- self ._voice_state , self ._voice_server = await asyncio .gather (* tasks , return_exceptions = True ) # noqa
161+ self ._voice_state , self ._voice_server = await asyncio .gather (* tasks ) # noqa
158162 except asyncio .TimeoutError :
159163 raise VoiceConnectionTimeout from None
160164
You can’t perform that action at this time.
0 commit comments