mehtadone / CryptoGramBot

A simple telegram bot that sends your balance updates from coinigy, send trade notifications from Poloniex and Bittrex and creates you a trade export for your own spreadsheet magicary.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v0.3.305 ChatId error if using group id

T1aMat opened this issue · comments

Hello.
I found a bug in v0.3.305, ChatId error if using group id, which begin with minus "-" sign.
If you using group id, bot didn't start & the following error appears.
If you use direct ChatId no problems occur.


2018-03-06 19:04 +03:00: [19:04:21 ERR] ChatId is invalid or missing in Telegram config
2018-03-06 19:04 +03:00: [19:04:21 ERR] Error in reading Telegram config
2018-03-06 19:04 +03:00: Application startup exception: System.ApplicationException: Telegram config is invalid - please check contents!
at CryptoGramBot.Startup.ConfigureConfig(IContainer container, IConfiguration configuration, ILogger1 log) in C:\projects\telecoinigy\CryptoGramBot\Startup.cs:line 192 at CryptoGramBot.Startup.ConfigureServices(IServiceCollection services) in C:\projects\telecoinigy\CryptoGramBot\Startup.cs:line 155 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services) at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices() at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication() 2018-03-06 19:04 +03:00: [19:04:21 FTL] Application startup exception System.ApplicationException: Telegram config is invalid - please check contents! at CryptoGramBot.Startup.ConfigureConfig(IContainer container, IConfiguration configuration, ILogger1 log) in C:\projects\telecoinigy\CryptoGramBot\Startup.cs:line 192
at CryptoGramBot.Startup.ConfigureServices(IServiceCollection services) in C:\projects\telecoinigy\CryptoGramBot\Startup.cs:line 155
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()

That’s my fault, I didn’t realize there could be negative numbers for the ChatId. Easy fix, I should be able to do it tonight.

Np, i will wait for a new release.
Thank you.