22import logging
33import warnings
44from abc import ABC , abstractmethod
5- from typing import Awaitable , Callable , List , Optional , TypeVar
5+ from typing import Awaitable , Callable , List , Optional , TypeVar , Union
66
77import discord
88from discord import Embed , Interaction
9+ from discord .utils import MISSING , _MissingSentinel
910from ModuBotDiscord .config import DiscordConfig
1011
1112from ..enums import PermissionEnum
@@ -20,18 +21,18 @@ async def send_message(
2021 content : Optional [str ] = None ,
2122 msg : Optional [str ] = None ,
2223 * ,
23- embed : Optional [Embed ] = None ,
24- embeds : Optional [List [Embed ]] = None ,
25- file : Optional [discord .File ] = None ,
26- files : Optional [List [discord .File ]] = None ,
27- view : Optional [discord .ui .View ] = None ,
24+ embed : Union [Embed , _MissingSentinel ] = MISSING ,
25+ embeds : Union [List [Embed ], _MissingSentinel ] = MISSING ,
26+ file : Union [discord .File , _MissingSentinel ] = MISSING ,
27+ files : Union [List [discord .File ], _MissingSentinel ] = MISSING ,
28+ view : Union [discord .ui .View , _MissingSentinel ] = MISSING ,
2829 tts : bool = False ,
2930 ephemeral : bool = False ,
30- allowed_mentions : Optional [discord .AllowedMentions ] = None ,
31+ allowed_mentions : Union [discord .AllowedMentions , _MissingSentinel ] = MISSING ,
3132 suppress_embeds : bool = False ,
3233 silent : bool = False ,
3334 delete_after : Optional [float ] = None ,
34- poll = None ,
35+ poll : Union [ discord . Poll , _MissingSentinel ] = MISSING ,
3536) -> None :
3637 if msg is not None :
3738 warnings .warn (
0 commit comments