|
|
@ -2523,6 +2523,16 @@ def guild_only(func: Optional[T] = None) -> Union[T, Callable[[T], T]]: |
|
|
|
return inner(func) |
|
|
|
|
|
|
|
|
|
|
|
@overload |
|
|
|
def private_channel_only(func: None = ...) -> Callable[[T], T]: |
|
|
|
... |
|
|
|
|
|
|
|
|
|
|
|
@overload |
|
|
|
def private_channel_only(func: T) -> T: |
|
|
|
... |
|
|
|
|
|
|
|
|
|
|
|
def private_channel_only(func: Optional[T] = None) -> Union[T, Callable[[T], T]]: |
|
|
|
"""A decorator that indicates this command can only be used in the context of DMs and group DMs. |
|
|
|
|
|
|
@ -2565,6 +2575,16 @@ def private_channel_only(func: Optional[T] = None) -> Union[T, Callable[[T], T]] |
|
|
|
return inner(func) |
|
|
|
|
|
|
|
|
|
|
|
@overload |
|
|
|
def dm_only(func: None = ...) -> Callable[[T], T]: |
|
|
|
... |
|
|
|
|
|
|
|
|
|
|
|
@overload |
|
|
|
def dm_only(func: T) -> T: |
|
|
|
... |
|
|
|
|
|
|
|
|
|
|
|
def dm_only(func: Optional[T] = None) -> Union[T, Callable[[T], T]]: |
|
|
|
"""A decorator that indicates this command can only be used in the context of bot DMs. |
|
|
|
|
|
|
@ -2606,9 +2626,7 @@ def dm_only(func: Optional[T] = None) -> Union[T, Callable[[T], T]]: |
|
|
|
return inner(func) |
|
|
|
|
|
|
|
|
|
|
|
def allowed_contexts( |
|
|
|
guilds: bool = MISSING, dms: bool = MISSING, private_channels: bool = MISSING |
|
|
|
) -> Union[T, Callable[[T], T]]: |
|
|
|
def allowed_contexts(guilds: bool = MISSING, dms: bool = MISSING, private_channels: bool = MISSING) -> Callable[[T], T]: |
|
|
|
"""A decorator that indicates this command can only be used in certain contexts. |
|
|
|
Valid contexts are guilds, DMs and private channels. |
|
|
|
|
|
|
@ -2650,6 +2668,16 @@ def allowed_contexts( |
|
|
|
return inner |
|
|
|
|
|
|
|
|
|
|
|
@overload |
|
|
|
def guild_install(func: None = ...) -> Callable[[T], T]: |
|
|
|
... |
|
|
|
|
|
|
|
|
|
|
|
@overload |
|
|
|
def guild_install(func: T) -> T: |
|
|
|
... |
|
|
|
|
|
|
|
|
|
|
|
def guild_install(func: Optional[T] = None) -> Union[T, Callable[[T], T]]: |
|
|
|
"""A decorator that indicates this command should be installed in guilds. |
|
|
|
|
|
|
@ -2688,6 +2716,16 @@ def guild_install(func: Optional[T] = None) -> Union[T, Callable[[T], T]]: |
|
|
|
return inner(func) |
|
|
|
|
|
|
|
|
|
|
|
@overload |
|
|
|
def user_install(func: None = ...) -> Callable[[T], T]: |
|
|
|
... |
|
|
|
|
|
|
|
|
|
|
|
@overload |
|
|
|
def user_install(func: T) -> T: |
|
|
|
... |
|
|
|
|
|
|
|
|
|
|
|
def user_install(func: Optional[T] = None) -> Union[T, Callable[[T], T]]: |
|
|
|
"""A decorator that indicates this command should be installed for users. |
|
|
|
|
|
|
@ -2729,7 +2767,7 @@ def user_install(func: Optional[T] = None) -> Union[T, Callable[[T], T]]: |
|
|
|
def allowed_installs( |
|
|
|
guilds: bool = MISSING, |
|
|
|
users: bool = MISSING, |
|
|
|
) -> Union[T, Callable[[T], T]]: |
|
|
|
) -> Callable[[T], T]: |
|
|
|
"""A decorator that indicates this command should be installed in certain contexts. |
|
|
|
Valid contexts are guilds and users. |
|
|
|
|
|
|
|