docstrings / formatting
This commit is contained in:
@@ -14,6 +14,7 @@ class RandMsg(FastAPI):
|
||||
"""
|
||||
|
||||
def __init__(self, app: FastAPI, util, constants) -> None:
|
||||
"""Initialize RandMsg endpoint."""
|
||||
self.app: FastAPI = app
|
||||
self.util = util
|
||||
self.constants = constants
|
||||
@@ -30,8 +31,13 @@ class RandMsg(FastAPI):
|
||||
self, data: Optional[RandMsgRequest] = None
|
||||
) -> JSONResponse:
|
||||
"""
|
||||
Get a randomly generated message
|
||||
- **short**: Optional, if True, will limit length of returned random messages to <=126 characters (Discord restriction related)
|
||||
Get a randomly generated message.
|
||||
|
||||
Parameters:
|
||||
- **data** (Optional[RandMsgRequest]): Optional request data for short messages.
|
||||
|
||||
Returns:
|
||||
- **JSONResponse**: Contains a random message.
|
||||
"""
|
||||
random.seed()
|
||||
short: Optional[bool] = False
|
||||
|
Reference in New Issue
Block a user