-
-
Notifications
You must be signed in to change notification settings - Fork 108
Starting new discord bot instance gives method not found: no ForEach in PSCustomObject #225
Description
Expected Behavior
Bot instances starts without an error. :(
Current Behavior
PoshBot.psm1:6886:
[System.Management.Automation.PSCustomObject] no method found "ForEach"
Possible Solution
This is my first time starting a poshbot instance. The bot is offline in the channel.
Steps to Reproduce (for bugs)
Used command flow:
Import-Module PoshBot
$botConfig = Get-PoshBotConfiguration -Path .\ValBotConfig.psd1
$backend = New-PoshBotDiscordBackend -Configuration $botConfig.BackendConfiguration$bot = New-PoshBotInstance -Configuration $botConfig -Backend $backend
$bot | Start-PoshBot -Verbose
ValBotConfig.psd1
@{
ApprovalConfiguration = @{
Commands = @()
ExpireMinutes = 30
}
DisallowDMs = $False
ModuleManifestsToLoad = @()
LogDirectory = 'C:\ValBot'
Name = 'ValBot'
BotAdmins = @('xxx')
AlternateCommandPrefixSeperators = @(':',',',';')
CommandHistoryMaxLogSizeMB = 10
MiddlewareConfiguration = @{
PreReceive = @()
PostReceive = @()
PreExecute = @()
PostResponse = @()
PreResponse = @()
PostExecute = @()
}
FormatEnumerationLimitOverride = -1
LogLevel = 'Verbose'
SendCommandResponseToPrivate = @()
ChannelRules = @{
IncludeCommands = @('*')
Channel = 'valbot'
ExcludeCommands = @()
}
ConfigurationDirectory = 'C:\ValBot'
MaxLogsToKeep = 5
AddCommandReactions = $True
CommandHistoryMaxLogsToKeep = 5
MaxLogSizeMB = 10
PluginDirectory = 'C:\ValBot'
MuteUnknownCommand = $False
PluginConfiguration = @{}
AlternateCommandPrefixes = @('valbot')
CommandPrefix = '!'
BackendConfiguration = @{
Name = 'DiscordBackend'
Token = 'xxx'
ClientId = 'xxx'
GuildId = 'xxx'
}
PluginRepository = @('PSGallery')
LogCommandHistory = $True
}
Context
I'm trying to get a Discord Bot to control my Valheim dedicated server.
Your Environment
- Module version used: PoshBot 0.13.0
- Operating System and PowerShell version:
Windows Server 2019 Datacenter
5.1.17763.1490