mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-21 21:17:48 +00:00
19 lines
505 B
Python
19 lines
505 B
Python
from typing import Any
|
|
|
|
from tunebot.redis import RedisBotEntity
|
|
|
|
|
|
class GlobalRedisUtils(RedisBotEntity):
|
|
async def raw_table_lookup(self, table_name: str, keys: list[Any]) -> list[Any]:
|
|
if len(keys) == 0:
|
|
return []
|
|
|
|
result: list[Any] = await self.redis.hmget(table_name, keys)
|
|
return result
|
|
|
|
async def raw_table_del_entry(self, table_name: str, keys: list[Any]):
|
|
if len(keys) == 0:
|
|
return
|
|
|
|
await self.redis.hdel(table_name, *keys)
|