I have the following code. But the phone presence doesn't show up, it worked on old dpy and ipy version without errors but since I updated to dpy v2 and newest version of ipy, it doesn't work anymore.
class MyDiscordWebSocket(WebSocketClient):
async def __identify(
self, shard: Optional[List[Tuple[int]]] = None, presence: Optional[ClientPresence] = None
) -> None:
self.__shard = shard
self.__presence = presence
payload: dict = {
"op": OpCodeType.IDENTIFY,
"d": {
"token": self._http.token,
"intents": self._intents.value,
"properties": {
"$os": "Android",
"$browser": "Discord Android",
"$device": "Discord Android",
},
},
}
if isinstance(shard, List) and len(shard) >= 1:
payload["d"]["shard"] = shard
if isinstance(presence, ClientPresence):
payload["d"]["presence"] = presence._json
bot = interactions.Client(token=TOKEN, presence=interactions.ClientPresence(
activities=[interactions.PresenceActivity(name="Kryptia Citybuild", type=interactions.PresenceActivityType.GAME)]))
bot._websocket = WebSocketClient(token=TOKEN, intents=bot._intents)
What can I do?