mirror of
https://github.com/Paillat-dev/pycord-rest.git
synced 2026-01-02 09:06:20 +00:00
Compare commits
2 Commits
feat/py-3.
...
feat/decod
| Author | SHA1 | Date | |
|---|---|---|---|
| e97c15d615 | |||
|
|
9e410d03f6 |
@@ -1,6 +1,7 @@
|
||||
# Copyright (c) Paillat-dev
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
import base64
|
||||
import functools
|
||||
import logging
|
||||
import warnings
|
||||
@@ -270,6 +271,7 @@ class App(discord.Bot):
|
||||
uvicorn_options["server_header"] = uvicorn_options.get("server_header", False)
|
||||
config = self._UvicornConfig(self._app, **uvicorn_options)
|
||||
server = self._UvicornServer(config)
|
||||
self._connection.application_id = int(base64.b64decode(token.split(".")[0] + "==").decode("utf-8"))
|
||||
try:
|
||||
self.dispatch("connect")
|
||||
await server.serve()
|
||||
|
||||
Reference in New Issue
Block a user