#130 Further plant system messages

This commit is contained in:
Daniel Brendel
2024-03-03 02:35:02 +01:00
parent 708ddf6569
commit ac80cf04dd
4 changed files with 61 additions and 2 deletions

View File

@@ -21,6 +21,56 @@ class TextBlockModule {
}
}
/**
* @param $name
* @param $url
* @return void
* @throws \Exception
*/
public static function plantToHistory($name, $url)
{
try {
$text = __('tb.moved_plant_to_history', ['name' => $name, 'url' => $url, 'history' => app('history_name')]);
static::addToChat($text, 'x1fab4');
} catch (\Exception $e) {
throw $e;
}
}
/**
* @param $name
* @param $url
* @return void
* @throws \Exception
*/
public static function plantFromHistory($name, $url)
{
try {
$text = __('tb.restored_plant_from_history', ['name' => $name, 'url' => $url, 'history' => app('history_name')]);
static::addToChat($text, 'x1fab4');
} catch (\Exception $e) {
throw $e;
}
}
/**
* @param $name
* @return void
* @throws \Exception
*/
public static function deletePlant($name)
{
try {
$text = __('tb.deleted_plant', ['name' => $name]);
static::addToChat($text, 'x1fab4');
} catch (\Exception $e) {
throw $e;
}
}
/**
* @param $message
* @param $icon