poshbotio / PoshBot

Powershell-based bot framework
MIT License
538 stars 108 forks source link

Error adding reaction to message when creating a function that fires on an event #63

Closed rayterrill closed 7 years ago

rayterrill commented 7 years ago

Expected Behavior

Should not error out.

Current Behavior

` {"DataTime":"2017-09-09 18:13:57Z","Class":"SlackBackend","Method":"AddReaction","Severity":"Error","LogLevel":"Info","Message":"Error adding reaction to message","Data":{"ok":false,"error":"no_item_specified"}} At line:6 char:9

Steps to Reproduce (for bugs)

  1. Create a function that should fire upon an event being triggered. Example: ` function WelcomeUserToRoom { [PoshBot.BotCommand( Command = $false, TriggerType = 'event', MessageType = 'PinAdded' )] [cmdletbinding()] param( [parameter(ValueFromRemainingArguments)] $Dummy )

    Write-Output 'YO YO YO' } `

  2. Trigger the function with the event (in the above case, pin a post).
  3. The error will be triggered

Context

Event-based functions does not appear to function.

Your Environment

Server 2012 R2, WMF 5.1

devblackops commented 7 years ago

Fixed in a5db0ef870ee436e9096912b66819f258c1cbcf9