Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BotId cannot exceed int32 (2147483648) #44

Open
VCStardust opened this issue Jan 7, 2022 · 4 comments
Open

BotId cannot exceed int32 (2147483648) #44

VCStardust opened this issue Jan 7, 2022 · 4 comments

Comments

@VCStardust
Copy link

Describe the bug
Cannot start when BotId exceeds int32 (2147483648).

To Reproduce
Create a new bot, fill its token into the configuration file, start.

Expected behavior
Just run.

Logs
[CORE][ERROR] Unexpected error during startup: System.ArgumentException: Invalid format. A valid token looks like "1234567:4TT8bAc8GHUspu3ERYn-KGcvsvGB9u_n4ddy". (Parameter 'token') at Telegram.Bot.TelegramBotClient..ctor(String token, IWebProxy webProxy) at pmcenter.Program.MainAsync(String[] args) in <hidden>\pmcenter\Program.cs:line 195

Additional context
In int.TryParse(string s, out int result), if the content of s exceeds int32, result will be 0

@fernvenue
Copy link

That's true, same thing happened when I try a new bot.

@rde9
Copy link

rde9 commented Feb 19, 2022

@VCStardust @fernvenue Please refer to https://github.com/JasonKhew96/pmcenter/tree/fix which solved the problem with updated dependencies. Thanks for their work.

@fernvenue
Copy link

@VCStardust @fernvenue Please refer to https://github.com/JasonKhew96/pmcenter/tree/fix which solved the problem with updated dependencies. Thanks for their work.

Good to know, thank you.

@VCStardust
Copy link
Author

@VCStardust @fernvenue Please refer to https://github.com/JasonKhew96/pmcenter/tree/fix which solved the problem with updated dependencies. Thanks for their work.

OK, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants