added MISSING

This commit is contained in:
Crussader 2021-10-20 20:56:09 +04:00 committed by GitHub
parent d451a80981
commit 4c2e35e56e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 2 deletions

View File

@ -20,7 +20,10 @@ DEALINGS IN THE SOFTWARE.
import random
import time
from typing import Union
from typing import (
Union,
Any,
)
from discord import AutoShardedClient, Client
from discord.ext.commands import AutoShardedBot, Bot
@ -28,7 +31,8 @@ from discord.ext.commands import AutoShardedBot, Bot
__all__ = [
'ExponentialBackoff',
'NodeStats',
'ClientType'
'ClientType',
'MISSING'
]
ClientType = Union[AutoShardedBot, AutoShardedClient, Bot, Client]
@ -85,3 +89,13 @@ class NodeStats:
def __repr__(self) -> str:
return f'<Pomice.NodeStats total_players={self.players_total!r} playing_active={self.players_active!r}>'
class _MissingSentinel:
def __repr__(self) -> str:
return "MISSING"
def __bool__(self) -> bool:
return False
MISSING: Any = _MissingSentinel()