-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Abilities: java.lang.NullPointerException: Cannot invoke "java.util.List.stream()" because "this.replies" is null #1436
Comments
I have the same error , with kotlin version :
test code
It runs OK , but when I send a message , I also encountered the same error
I am not sure if this is related (abilities = null) |
I'm having the same issue. It seems the onRegister method from BaseAbilityBot
is not called. Solved it by calling it explicitely in my bot's constructor and it doesn´t seem to cause any issues, Hope this helps.
|
It's help |
Describe the bug
When trying to create a Telegram bot using the Abilities framework, a NullPointerException is thrown, indicating that the
replies
list is null when trying to invoke thestream()
method.To Reproduce
Steps to reproduce the behavior:
PartyBot
class extendingAbilityBot
creatorId()
method andsayHelloWorld()
AbilityTgBotApplication
class with amain
method to register the botExpected behavior
The bot should register successfully and be able to respond to the
/hello
command without throwing any exceptions.Code Snippets
PartyBot class:
TgBotApplication class:
Error message
Environment:
Additional context
This issue seems similar to a problem reported by other users.
The text was updated successfully, but these errors were encountered: