Merge branch 'main' into patch-1
commit
565e048adf
@ -1,13 +1,23 @@
|
|||||||
|
$text1 = "Giveaway in the discord"
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
$TargetLanguage = $Args[0]
|
$TargetLanguage = $Args[0]
|
||||||
$actualdate = Get-Date -Format "yyyy/MM/dd"
|
$actualdate = Get-Date -Format "yyyy/MM/dd"
|
||||||
$newyeardate = Get-Date -Month 1 -Day 1 -Year (Get-Date).Year -Format "yyyy/MM/dd"
|
$newyeardate = Get-Date -Month 1 -Day 1 -Year (Get-Date).Year -Format "yyyy/MM/dd"
|
||||||
|
$Uri1 = “https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=$($TargetLanguage)&dt=t&q=$text1”
|
||||||
|
$Response = Invoke-RestMethod -Uri $Uri1 -Method Get
|
||||||
|
$Translation1 = $Response[0].SyncRoot | foreach { $_[0] }
|
||||||
|
|
||||||
if ($actualdate -eq $newyeardate) {
|
write-host $Translation1
|
||||||
$newyeartext = "Happy New Year!"
|
write-host "https://discord.gg/medicat"
|
||||||
$newyearUri = "https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=$($TargetLanguage)&dt=t&q=$newyeartext"
|
|
||||||
$Response = Invoke-RestMethod -Uri $newyearUri -Method Get
|
|
||||||
$newyearTranslation = $Response[0][0][0]
|
|
||||||
Write-Host $newyearTranslation
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "https://discord.gg/medicat"
|
|
||||||
|
#if ($actualdate -eq $newyeardate) {
|
||||||
|
# $newyeartext = "Happy New Year!"
|
||||||
|
# $newyearUri = "https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=$($TargetLanguage)&dt=t&q=$newyeartext"
|
||||||
|
# $Response = Invoke-RestMethod -Uri $newyearUri -Method Get
|
||||||
|
# $newyearTranslation = $Response[0][0][0]
|
||||||
|
# Write-Host $newyearTranslation
|
||||||
|
#}
|
||||||
|
#$text1 = "Giveaway in the discord"
|
||||||
|
Loading…
Reference in New Issue