mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Fix type errors with required keys in the integration types
This commit is contained in:
1 parent
1ae40a11b7
commit
794327cdb4
3 files changed
+33
-22
No files matched your search
+2
-2
@@ -45,7 +45,7 @@ from .iterators import AuditLogIterator, MemberIterator
|
||||
from .widget import Widget
|
||||
from .asset import Asset
|
||||
from .flags import SystemChannelFlags
|
||||
from .integrations import BotIntegration, StreamIntegration, _integration_factory
|
||||
from .integrations import Integration, _integration_factory
|
||||
|
||||
__all__ = (
|
||||
'Guild',
|
||||
@@ -1805,7 +1805,7 @@ class Guild(Hashable):
|
||||
data = await self._state.http.get_all_integrations(self.id)
|
||||
|
||||
def convert(d):
|
||||
factory, itype = _integration_factory(d['type'])
|
||||
factory, _ = _integration_factory(d['type'])
|
||||
if factory is None:
|
||||
raise InvalidData('Unknown integration type {type!r} for integration ID {id}'.format_map(d))
|
||||
return factory(guild=self, data=d)
|
||||
|
||||
Reference in new issue
Block a user