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

Move Dispathcer example out of com.github.kotlintelegrambot.dispatcher and add required imports #252

Open
wesley800 opened this issue Jul 14, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@wesley800
Copy link

wesley800 commented Jul 14, 2022

When I tried to copy-paste the exmaple code to a class under my custom package (other than com.github.kotlintelegrambot.dispatcher), I found that all update subclasses are missing. Meanwhile IDEA just won't give out any import suggestions. I'm new to kotlin and it took quite a few time to find the root cause. Maybe it's better to make the examples more like a standalone project, rather than lies under com.github.kotlintelegrambot?

To be specific, I have to add the below lines if I change the package name in the first line of kotlin-telegram-bot-main/samples/dispatcher/src/main/kotlin/com/github/kotlintelegrambot/dispatcher/Main.kt. Though they are (obviously) not required if package name is com.github.kotlintelegrambot.dispatcher.

import com.github.kotlintelegrambot.dispatcher.message
import com.github.kotlintelegrambot.dispatcher.command
import com.github.kotlintelegrambot.dispatcher.callbackQuery
import com.github.kotlintelegrambot.dispatcher.text
import com.github.kotlintelegrambot.dispatcher.location
import com.github.kotlintelegrambot.dispatcher.contact
import com.github.kotlintelegrambot.dispatcher.channel
import com.github.kotlintelegrambot.dispatcher.inlineQuery
import com.github.kotlintelegrambot.dispatcher.photos
import com.github.kotlintelegrambot.dispatcher.dice
import com.github.kotlintelegrambot.dispatcher.telegramError
@wesley800 wesley800 added the bug Something isn't working label Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants