EvotecIT / PSDiscord

Simple PowerShell module allowing to send messages to Discord Channel over webhooks
47 stars 7 forks source link

Unable to find type [RGBColors] #5

Closed tinuwalther closed 3 years ago

tinuwalther commented 3 years ago

Hi @PrzemyslawKlys

I try to send automated discord messages to my server with your PSDiscord and I get the error message below:

InvalidOperation: C:\Program Files\PowerShell\Modules\PSDiscord\0.2.3\PSDiscord.psm1:158:9
Line |
 158 |          [RGBColors] $Color,
     |          ~~~~~~~~~~~
     | Unable to find type [RGBColors].

If I change the custom type [RGBColors] in PSDiscord.psm1:158 to [String], it works fine.

Environment:

Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PSDiscord:

Version              Name                                Repository
-------              ----                                ----------
0.2.3                PSDiscord                           PSGallery

Can you please have a look at your code and fix it?

Thanks for your great work with you're Modules PSTeams, PSDiscord and many other PSModules!

PrzemyslawKlys commented 3 years ago

Fixed. Replaced old enum which is part of another module and I've been getting rid of it for some time - now supports 800+ colors and uses register-argument completer as does PSWriteHTML. Thank you for reporting