Skip to content

When adding a channel rule the default does not get removed #131

@DWOF

Description

@DWOF

Expected Behavior

When setting the channel rules in the configuration it should replace the default rule that allows all commands in all channels

Current Behavior

When setting the channel rules in the configuration it merges with the default rule that allows all commands in all channels

Steps to Reproduce (for bugs)

$botParams = @{
BackendConfiguration = @{
        Name = 'SlackBackend'
        Token = 'XXXX'
    }
ChannelRules = @(
        @{
            Channel = 'bottestingfactory'
            IncludeCommands = @('*')
            ExcludeCommands = @()
          }
  )
}

$myBotConfig = New-PoshBotConfiguration @botParams

$myBotConfig.ChannelRules

Context

Unable to limit commands in slack channels

Your Environment

  • Module version used: 0.11.2
  • Operating System and PowerShell version: Windows 10 - 5.1.17134.228

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions