en-US/PSDsHook-help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Invoke-PSDsHook</command:name>
      <command:verb>Invoke</command:verb>
      <command:noun>PSDsHook</command:noun>
      <maml:description>
        <maml:para>Invoke-PSDsHook Use PowerShell classes to make using Discord Webhooks easy and extensible</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>This function allows you to use Discord Webhooks with embeds, files, and various configuration settings</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Invoke-PSDsHook</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>CreateConfig</maml:name>
          <maml:Description>
            <maml:para>If specified, will create a configuration based on other parameter settings (ConfigName and WebhookUrl)</maml:para>
          </maml:Description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>WebhookUrl</maml:name>
          <maml:Description>
            <maml:para>If used with CreateConfig, this is the url that will be stored in the configuration file. If used with an embed or file, this URL will be used in the webhook call.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ConfigName</maml:name>
          <maml:Description>
            <maml:para>Specified a name for the configuration file. Can be used when creating a configuration file, as well as when passing embeds/files.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>Config</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Invoke-PSDsHook</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>WebhookUrl</maml:name>
          <maml:Description>
            <maml:para>If used with CreateConfig, this is the url that will be stored in the configuration file. If used with an embed or file, this URL will be used in the webhook call.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>FilePath</maml:name>
          <maml:Description>
            <maml:para>{{Fill FilePath Description}}</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ConfigName</maml:name>
          <maml:Description>
            <maml:para>Specified a name for the configuration file. Can be used when creating a configuration file, as well as when passing embeds/files.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>Config</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Invoke-PSDsHook</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>WebhookUrl</maml:name>
          <maml:Description>
            <maml:para>If used with CreateConfig, this is the url that will be stored in the configuration file. If used with an embed or file, this URL will be used in the webhook call.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ConfigName</maml:name>
          <maml:Description>
            <maml:para>Specified a name for the configuration file. Can be used when creating a configuration file, as well as when passing embeds/files.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>Config</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ListConfigs</maml:name>
          <maml:Description>
            <maml:para>Lists configuration files</maml:para>
          </maml:Description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Invoke-PSDsHook</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>WebhookUrl</maml:name>
          <maml:Description>
            <maml:para>If used with CreateConfig, this is the url that will be stored in the configuration file. If used with an embed or file, this URL will be used in the webhook call.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ConfigName</maml:name>
          <maml:Description>
            <maml:para>Specified a name for the configuration file. Can be used when creating a configuration file, as well as when passing embeds/files.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>Config</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>EmbedObject</maml:name>
          <maml:Description>
            <maml:para>Accepts an array of [EmbedObject]'s to pass in the webhook call.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Invoke-PSDsHook</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>WebhookUrl</maml:name>
          <maml:Description>
            <maml:para>If used with CreateConfig, this is the url that will be stored in the configuration file. If used with an embed or file, this URL will be used in the webhook call.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ConfigName</maml:name>
          <maml:Description>
            <maml:para>Specified a name for the configuration file. Can be used when creating a configuration file, as well as when passing embeds/files.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>Config</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>HookText</maml:name>
          <maml:Description>
            <maml:para>{{Fill HookText Description}}</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>CreateConfig</maml:name>
        <maml:Description>
          <maml:para>If specified, will create a configuration based on other parameter settings (ConfigName and WebhookUrl)</maml:para>
        </maml:Description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>WebhookUrl</maml:name>
        <maml:Description>
          <maml:para>If used with CreateConfig, this is the url that will be stored in the configuration file. If used with an embed or file, this URL will be used in the webhook call.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>FilePath</maml:name>
        <maml:Description>
          <maml:para>{{Fill FilePath Description}}</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>ConfigName</maml:name>
        <maml:Description>
          <maml:para>Specified a name for the configuration file. Can be used when creating a configuration file, as well as when passing embeds/files.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>Config</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>ListConfigs</maml:name>
        <maml:Description>
          <maml:para>Lists configuration files</maml:para>
        </maml:Description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>EmbedObject</maml:name>
        <maml:Description>
          <maml:para>Accepts an array of [EmbedObject]'s to pass in the webhook call.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>HookText</maml:name>
        <maml:Description>
          <maml:para>{{Fill HookText Description}}</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues />
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
        <dev:code>(Create a configuration file)</dev:code>
        <dev:remarks>
          <maml:para>Configuration files are stored in a sub directory of your user's home directory named .psdshook/configs</maml:para>
          <maml:para>Invoke-PsDsHook -CreateConfig -WebhookUrl "www.hook.com/hook"</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title>
        <dev:code>(Create a configuration file with a non-standard name)</dev:code>
        <dev:remarks>
          <maml:para>Configuration files are stored in a sub directory of your user's home directory named .psdshook/configs</maml:para>
          <maml:para>Invoke-PsDsHook -CreateConfig -WebhookUrl "www.hook.com/hook2" -ConfigName 'config2'</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title>
        <dev:code>(Send an embed with the default config)</dev:code>
        <dev:remarks>
          <maml:para>using module PSDsHook</maml:para>
          <maml:para>If the module is not in one of the folders listed in ($env:PSModulePath -split "$([IO.Path]::PathSeparator)") You must specify the full path to the psm1 file in the above using statement Example: using module 'C:\users\thegn\repos\PsDsHook\out\PSDsHook\0.0.1\PSDsHook.psm1'</maml:para>
          <maml:para>Create embed builder object via the [DiscordEmbed] class $embedBuilder = [DiscordEmbed]::New( 'title', 'description' )</maml:para>
          <maml:para>Add blue color $embedBuilder.WithColor( [DiscordColor]::New( 'blue' ) )</maml:para>
          <maml:para>Finally, call the function that will send the embed array to the webhook url via the default configuraiton file Invoke-PSDsHook -EmbedObject $embedBuilder -Verbose</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title>
        <dev:code>(Send an webhook with just text)</dev:code>
        <dev:remarks>
          <maml:para>Invoke-PSDsHook -HookText 'this is the webhook message' -Verbose</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
</helpItems>