mirror of
https://github.com/MelisaDev/melisa.git
synced 2024-11-11 19:07:28 +03:00
feat(client): connect RestApp
This commit is contained in:
parent
3fdce239ef
commit
f4f80ce354
1 changed files with 11 additions and 10 deletions
|
@ -1,20 +1,20 @@
|
|||
import logging
|
||||
import asyncio
|
||||
import logging
|
||||
import signal
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from typing import Dict, List, Union, Any, Iterable, Optional, Callable
|
||||
|
||||
from .models import User, Guild, Activity
|
||||
from .models.app import Shard
|
||||
from .utils import Snowflake, APIModelBase
|
||||
from .utils.types import Coro
|
||||
from .core.http import HTTPClient
|
||||
from rest import RESTApp
|
||||
from .core.gateway import GatewayBotInfo
|
||||
from .models.guild.channel import Channel, ChannelType, channel_types_for_converting
|
||||
from .utils.logging import init_logging
|
||||
from .models import User, Guild, Activity
|
||||
from .models.app import Shard
|
||||
from .models.app.intents import Intents
|
||||
from .utils.snowflake import Snowflake
|
||||
from .utils import APIModelBase
|
||||
from .utils.logging import init_logging
|
||||
from .utils.types import Coro
|
||||
from .utils.waiters import WaiterMgr
|
||||
|
||||
_logger = logging.getLogger("melisa")
|
||||
|
@ -69,7 +69,8 @@ class Client:
|
|||
self._loop = asyncio.get_event_loop()
|
||||
|
||||
self.shards: Dict[int, Shard] = {}
|
||||
self.http: HTTPClient = HTTPClient(token)
|
||||
self.rest: RESTApp = RESTApp(token)
|
||||
self.http = self.rest.http
|
||||
self._events: Dict[str, Coro] = {}
|
||||
self._waiter_mgr = WaiterMgr(self._loop)
|
||||
|
||||
|
@ -315,4 +316,4 @@ class Client:
|
|||
return await self._waiter_mgr.wait_for(event_name, check, timeout)
|
||||
|
||||
|
||||
Bot = Client
|
||||
Bot = Client
|
||||
|
|
Loading…
Reference in a new issue