DotNetNomads / UltraMafia

The first OpenSource Mafia Bot!
MIT License
10 stars 5 forks source link

Registration message issue #11

Closed binali-rustamov closed 4 years ago

binali-rustamov commented 4 years ago
mafia_mafia-game.1.vmaz89bd1606@docker    | [18:05:54 DBG] 'GameDbContext' disposed.
mafia_mafia-game.1.vmaz89bd1606@docker    | Unhandled exception. System.ArgumentException: An item with the same key has already been added. Key: 142
mafia_mafia-game.1.vmaz89bd1606@docker    |    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
mafia_mafia-game.1.vmaz89bd1606@docker    |    at UltraMafia.Frontend.Telegram.TelegramFrontendExtensions.CreateRegistrationMessage(ITelegramBotClient bot, GameSession newSession, TelegramFrontendSettings settings) in /tmp/src/UltraMafia/Frontend/Telegram/TelegramFrontendExtensions.cs:line 140
mafia_mafia-game.1.vmaz89bd1606@docker    |    at UltraMafia.Frontend.Telegram.TelegramFrontendExtensions.UpdateRegistrationMessage(ITelegramBotClient bot, GameSession session, TelegramFrontendSettings settings) in /tmp/src/UltraMafia/Frontend/Telegram/TelegramFrontendExtensions.cs:line 212
mafia_mafia-game.1.vmaz89bd1606@docker    |    at UltraMafia.Frontend.Telegram.TelegramFrontend.OnGamerJoined(GameSession session, GamerAccount account) in /tmp/src/UltraMafia/Frontend/Telegram/TelegramFrontend.cs:line 566
mafia_mafia-game.1.vmaz89bd1606@docker    |    at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
mafia_mafia-game.1.vmaz89bd1606@docker    |    at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
mafia_mafia-game.1.vmaz89bd1606@docker    |    at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
mafia_mafia-game.1.vmaz89bd1606@docker    |    at System.Threading.QueueUserWorkItemCallback.Execute()
mafia_mafia-game.1.vmaz89bd1606@docker    |    at System.Threading.ThreadPoolWorkQueue.Dispatch()
binali-rustamov commented 4 years ago
[15:18:18 ERR] Error occured when accessing to Bot API
Telegram.Bot.Exceptions.ApiRequestException: Bad Request: message to delete not found
   at Telegram.Bot.TelegramBotClient.MakeRequestAsync[TResponse](IRequest`1 request, CancellationToken cancellation
Token)
   at UltraMafia.Frontend.Telegram.TelegramFrontendExtensions.<>c__DisplayClass12_0.<<CreateRegistrationMessage>b__
0>d.MoveNext() in /tmp/src/UltraMafia/Frontend/Telegram/TelegramFrontendExtensions.cs:line 154
--- End of stack trace from previous location where exception was thrown ---
   at UltraMafia.Frontend.Telegram.TelegramFrontendExtensions.LockAndDo(ITelegramBotClient bot, Func`1 action) in /
tmp/src/UltraMafia/Frontend/Telegram/TelegramFrontendExtensions.cs:line 261
[15:18:19 ERR] Error occured when accessing to Bot API
System.ArgumentException: An item with the same key has already been added. Key: 182
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at UltraMafia.Frontend.Telegram.TelegramFrontendExtensions.<>c__DisplayClass12_1.<<CreateRegistrationMessage>b__
1>d.MoveNext() in /tmp/src/UltraMafia/Frontend/Telegram/TelegramFrontendExtensions.cs:line 169
--- End of stack trace from previous location where exception was thrown ---
   at UltraMafia.Frontend.Telegram.TelegramFrontendExtensions.LockAndDo(ITelegramBotClient bot, Func`1 action) in /
tmp/src/UltraMafia/Frontend/Telegram/TelegramFrontendExtensions.cs:line 261
binali-rustamov commented 4 years ago

Fixed!