2021-12-10 16:06:28 +01:00
|
|
|
|
<#
|
|
|
|
|
.SYNOPSIS
|
|
|
|
|
Replies to "Roll a dice"
|
|
|
|
|
.DESCRIPTION
|
2022-01-30 10:49:30 +01:00
|
|
|
|
This PowerShell script rolls a dice and returns the number by text-to-speech (TTS).
|
2021-12-10 16:06:28 +01:00
|
|
|
|
.EXAMPLE
|
|
|
|
|
PS> ./roll-a-dice
|
|
|
|
|
.LINK
|
|
|
|
|
https://github.com/fleschutz/PowerShell
|
2022-01-30 10:49:30 +01:00
|
|
|
|
.NOTES
|
2022-09-06 21:42:04 +02:00
|
|
|
|
Author: Markus Fleschutz | License: CC0
|
2021-12-10 16:06:28 +01:00
|
|
|
|
#>
|
|
|
|
|
|
2021-12-13 08:20:02 +01:00
|
|
|
|
$Reply = "It's", "I get", "Now it's", "OK, I have" | Get-Random
|
|
|
|
|
$Number = "1", "2", "3", "4", "5", "6" | Get-Random
|
2021-12-10 16:06:28 +01:00
|
|
|
|
|
2022-11-18 16:54:04 +01:00
|
|
|
|
& "$PSScriptRoot/speak-english.ps1" "$Reply $Number."
|
2021-12-10 16:06:28 +01:00
|
|
|
|
exit 0 # success
|