Closed falkheiland closed 4 years ago
The best way I found is to create a string then paste that as the hashtable. Something like this works well... There is probably a better way to do it, but this'll work while you wait for a better response.
$response | foreach{$tempNameString += @"
$_.Name
"@
$tempTimeString += @"
$_.Value
"@
}
$HashTable = @{
Name = $tempNameString
Value = $tempTimeString
}@
New-PoshBotCardResponse -Fields $HashTable
The best way I found is to create a string then paste that as the hashtable. Something like this works well... There is probably a better way to do it, but this'll work while you wait for a better response.
thanks, will definitely try that
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Trying to pass a (ordered) hashtable as Discord message (card).
Expected Behavior
A hashtable to display as a table in the card response.
Current Behavior
Output in discord is neither ordered nor a table which resembles the results correcty.
Possible Solution
Steps to Reproduce (for bugs)
New-PoshBotCardResponse -Type Normal -Fields $response
$response is a ordered hashtable, already ordered by time.
$response output:
Output in Discord:
Context
I want to create a discord message with a ordered table.
Your Environment