Public/Invoke-WakeOnLAN.ps1

function Invoke-WakeOnLAN {
    <#
    .SYNOPSIS
        Sends a Wake-On-LAN packet to target computer.
    .PARAMETER Computer
        Target computer to wake up.
    .EXAMPLE
        !wake stnjn109.sunssc.local
    #>

    [PoshBot.BotCommand(
        CommandName = 'WOL',
        Aliases = ('wake', 'wakeonlan', 'wol')
    )]
    [cmdletbinding()]
    param(
        [parameter(Mandatory)]
        [string]$Computer
    )
    try {
        $result = Invoke-Command -Computername pdq.sunssc.local -ScriptBlock {
            PDQInventory.exe WakeComputer -Computer $Using:Computer
        }
        New-PoshBotTextResponse -Text ($result | Out-String) -AsCode
    }
    catch {
        Write-Output "$($_.Exception.Message)"
        Write-Output "$($_.error.message)"
    }
}