Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
Support base Client (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skelmis authored Jun 29, 2021
1 parent 1cb6105 commit abfe8e5
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions discord/ext/ipc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,17 @@ async def handle_accept(self, request):
response = {"error": "Invalid or no endpoint given.", "code": 400}
else:
server_response = IpcServerResponse(request)
attempted_cls = self.bot.cogs.get(
self.endpoints[endpoint].__qualname__.split(".")[0]
)
try:
attempted_cls = self.bot.cogs.get(
self.endpoints[endpoint].__qualname__.split(".")[0]
)

if attempted_cls:
arguments = (attempted_cls, server_response)
else:
if attempted_cls:
arguments = (attempted_cls, server_response)
else:
arguments = (server_response,)
except AttributeError:
# Support base Client
arguments = (server_response,)

try:
Expand Down

0 comments on commit abfe8e5

Please sign in to comment.