entry/exit functions added

This commit is contained in:
onyx-and-iris 2022-12-16 18:19:35 +00:00
parent a40e36998c
commit fc290ba90c

View File

@ -88,4 +88,30 @@ Function Get-RemotePotato {
return [Remote]::new('potato')
}
Export-ModuleMember -Function Get-RemoteBasic, Get-RemoteBanana, Get-RemotePotato
Function Connect-Voicemeeter {
param([String]$Kind)
try {
switch ($Kind) {
"basic" {
return Get-RemoteBasic
}
"banana" {
return Get-RemoteBanana
}
"potato" {
return Get-RemotePotato
}
default { throw [LoginError]::new('Unknown Voicemeeter kind') }
}
}
catch [LoginError] {
Write-Warning $_.Exception.ErrorMessage()
Exit
}
}
Function Disconnect-Voicemeeter {
Logout
}
Export-ModuleMember -Function Get-RemoteBasic, Get-RemoteBanana, Get-RemotePotato, Connect-Voicemeeter, Disconnect-Voicemeeter