Skip to content

Commit b4421a1

Browse files
authored
Merge pull request #504 from plun1331/patch-4
Fix voice_client in ApplicationContext
2 parents e00b272 + 29d6254 commit b4421a1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

discord/commands/context.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ def author(self) -> Optional[Union[Member, User]]:
109109

110110
@property
111111
def voice_client(self):
112+
if self.guild is None:
113+
return None
114+
112115
return self.guild.voice_client
113116

114117
@cached_property

0 commit comments

Comments
 (0)