PowerShell/Scripts/roll-a-dice.ps1

19 lines
452 B
PowerShell
Raw Normal View History

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
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
2021-12-13 08:20:02 +01:00
& "$PSScriptRoot/give-reply.ps1" "$Reply $Number."
2021-12-10 16:06:28 +01:00
exit 0 # success