chr233 / ASFEnhance

ASF 扩展命令插件 / External commands for ASF
GNU Affero General Public License v3.0
489 stars 40 forks source link

Craftbadges worked fine then threw an error #189

Closed EvE-Player closed 7 months ago

EvE-Player commented 8 months ago

Describe the bug / Bug 描述 Describe what the bug is 简单描述一下是什么 bug I tried using the craftbadges command and it worked successfully the first five times but then the 6th and 7th time it spat out the error

!CRAFTBADGE BigBot

[21:29]
Botty bot bot:
    <BigBot> 51 / 149 badges crafted successful

[21:32]
Whozopie:
    !cb BigBot

[21:33]
Botty bot bot:
    <BigBot> 34 / 149 badges crafted successful

[21:40]
Whozopie:
    !cb BigBot

[21:42]
Botty bot bot:
    <BigBot> 23 / 149 badges crafted successful

[21:43]
Whozopie:
    !cb BigBot

[21:44]
Botty bot bot:
    <BigBot> 15 / 149 badges crafted successful

[21:46]
Whozopie:
    !cb BigBot

[21:48]
Botty bot bot:
    <BigBot> 14 / 149 badges crafted successful

Error Log / 错误日志 Please paste the error log of ASFEnhance, for example 请在此粘贴 ASFEnhance 的错误日志, 示例如下

ASFenhance encountered error, error logs below========================================================================== - Origin Message: cb BigBot- Access: Owner - ASF Version: 5.5.0.11 - Plugin Version: 2.0.5.1=========================================================================={  "EULA": true,  "Statistic": true,  "DevFeature": false,  "DisabledCmds": null,  "Address": null,  "Addresses": [],  "ApiKey": ""}========================================================================== - Exception Type: System.ArgumentException - Exception Message: An item with the same key has already been added. Key: 444410   at System.Collections.Generic.Dictionary`2.TryInsert(TKey, TValue, InsertionBehavior)   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)   at ASFEnhance.Profile.HtmlParser.ParseCraftableBadgeDict(HtmlDocumentResponse response)   at ASFEnhance.Profile.WebRequest.FetchCraftableBadgeDict(Bot bot)   at ASFEnhance.Profile.Command.ResponseCraftBadge(Bot bot)   at ArchiSteamFarm.Core.Utilities.InParallel[T](IEnumerable`1 tasks)   at ASFEnhance.Profile.Command.ResponseCraftBadge(String botNames)   at ASFEnhance.ASFEnhance.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamId)
chr233 commented 8 months ago

this command will not get craftable card set count, it will craft every set once

EvE-Player commented 8 months ago

Yes I understand that and it did, it worked the first five times but then spit out this error after while I still had sets let to be crafted?

chr233 commented 8 months ago

i just saw the exception below, i will review the code

chr233 commented 7 months ago

fixed in 2.0.9.3