Skip to content

Commit fedb6fa

Browse files
committed
Get random reason easier
1 parent ab3d661 commit fedb6fa

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

powershell/smack_my_bitch_up.ps1

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,19 @@ if (-not (QWINSTA | FINDSTR $env:USERNAME)) {
1414
$MY_NUMBER='+xxx'
1515
$HER_NUMBER='+xxx'
1616

17-
$REASONS=
17+
$REASONS =
1818
'Working hard',
1919
'Gotta ship this feature',
2020
'Someone fucked the system again'
21-
22-
$RAND = Get-Random -Maximum $REASONS.Count
23-
24-
$MSG="Late at work. $REASONS[$RAND]"
21+
$reason = $REASONS | Get-Random
22+
$message = "Late at work. $reason."
2523

2624
$API_URL = "https://api.twilio.com/2010-04-01/Accounts/$env:TWILIO_ACCOUNT_SID/Messages"
2725
$BASE64AUTHINFO = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $env:TWILIO_ACCOUNT_SID,$env:TWILIO_AUTH_TOKEN)))
2826
$body = @{
2927
From = $MY_NUMBER;
3028
To = $HER_NUMBER;
31-
Body = $MSG;
29+
Body = $message;
3230
}
3331

3432
#Send a text message and Log errors

0 commit comments

Comments
 (0)