/setup command implemented
This commit is contained in:
@@ -2,7 +2,7 @@ from typing import List, Union
|
||||
|
||||
from apscheduler.triggers.cron import CronTrigger
|
||||
from libbot.pyrogram.classes import PyroClient as LibPyroClient
|
||||
from pymongo import ASCENDING, GEO2D
|
||||
from pymongo import ASCENDING, GEOSPHERE, TEXT
|
||||
from pyrogram.types import User
|
||||
|
||||
from classes.location import Location
|
||||
@@ -24,9 +24,10 @@ class PyroClient(LibPyroClient):
|
||||
[("id", ASCENDING)], name="location_id", unique=True
|
||||
)
|
||||
await col_locations.create_index(
|
||||
[("location", GEO2D)],
|
||||
[("location", GEOSPHERE)],
|
||||
name="location_location",
|
||||
)
|
||||
await col_locations.create_index([("name", TEXT)], name="location_name")
|
||||
return await super().start(**kwargs)
|
||||
|
||||
async def find_user(self, user: Union[int, User]) -> PyroUser:
|
||||
|
Reference in New Issue
Block a user