summaryrefslogtreecommitdiff
path: root/samples/inline-keyboard/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'samples/inline-keyboard/src/main.cpp')
-rw-r--r--samples/inline-keyboard/src/main.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/samples/inline-keyboard/src/main.cpp b/samples/inline-keyboard/src/main.cpp
index 4e6fb21..440f965 100644
--- a/samples/inline-keyboard/src/main.cpp
+++ b/samples/inline-keyboard/src/main.cpp
@@ -10,11 +10,6 @@ using namespace TgBot;
bool sigintGot = false;
int main() {
- signal(SIGINT, [](int s) {
- printf("SIGINT got");
- sigintGot = true;
- });
-
Bot bot("PLACE YOUR TOKEN HERE");
// Thanks Pietro Falessi for code
@@ -40,6 +35,10 @@ int main() {
}
});
+ signal(SIGINT, [](int s) {
+ printf("SIGINT got");
+ sigintGot = true;
+ });
try {
printf("Bot username: %s\n", bot.getApi().getMe()->username.c_str());