mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-24 02:48:17 +02:00
Update good-night.ps1
This commit is contained in:
parent
36938724dc
commit
01e333675d
@ -12,13 +12,7 @@
|
|||||||
#>
|
#>
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$Generator = New-Object System.Random
|
$Answer = "Good night to you, too.", "Good night to you, my friend.", "Have a good night. Sleep well.", "Good night and sweet dreams." | Get-Random
|
||||||
$Answer = switch([int]$Generator.next(0, 3)) {
|
|
||||||
0 { "Good night to you, too." }
|
|
||||||
1 { "Good night to you, my friend." }
|
|
||||||
2 { "Have a good night. Sleep well." }
|
|
||||||
3 { "Good night and sweet dreams." }
|
|
||||||
}
|
|
||||||
& "$PSScriptRoot/speak-english.ps1" "$Answer"
|
& "$PSScriptRoot/speak-english.ps1" "$Answer"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user