fix(settings): Fix some input_formatted cases.

This commit is contained in:
2023-10-02 07:42:00 +03:00
parent f4802ce794
commit 7d59bc6d2c
2 changed files with 3 additions and 3 deletions

View File

@@ -259,7 +259,7 @@ class TimerOptions(SettingGroup):
@property
def input_formatted(self):
return str(int(self._data // 60)) if self._data else None
return str(int(self._data // 60)) if self._data else '25'
@classmethod
async def _parse_string(cls, parent_id, string, **kwargs):
@@ -300,7 +300,7 @@ class TimerOptions(SettingGroup):
@property
def input_formatted(self):
return str(int(self._data // 60)) if self._data else None
return str(int(self._data // 60)) if self._data else '5'
@classmethod
async def _parse_string(cls, parent_id, string, **kwargs):

View File

@@ -396,7 +396,7 @@ class InteractiveSetting(BaseSetting[ParentID, SettingData, SettingValue]):
return TextInput(
label=self.display_name,
placeholder=self.accepts,
default=self.input_formatted[:4000],
default=self.input_formatted[:4000] if self.input_formatted else None,
required=self._required
)