16 lines
345 B
Python
16 lines
345 B
Python
"""Embed field helper."""
|
|
from dataclasses import dataclass
|
|
from typing import Any
|
|
|
|
|
|
@dataclass
|
|
class Field:
|
|
"""Embed Field."""
|
|
|
|
name: Any
|
|
value: Any
|
|
inline: bool = True
|
|
|
|
def to_dict(self) -> dict:
|
|
"""Convert Field to d.py field dict."""
|
|
return {"name": self.name, "value": self.value, "inline": self.inline}
|