This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.darkmentat | |
| import org.telegram.telegrambots.ApiContextInitializer | |
| import org.telegram.telegrambots.api.methods.send.SendMessage | |
| import org.telegram.telegrambots.api.objects.Update | |
| import org.telegram.telegrambots.bots.TelegramLongPollingBot | |
| import java.util.Random | |
| import org.telegram.telegrambots.TelegramBotsApi | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extern crate telegram_bot; | |
| use super::git_watcher::GitWatcher; | |
| use telegram_bot::*; | |
| use std::time::*; | |
| use futures::Future; | |
| use futures::Stream; | |
| use futures::stream::*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [package] | |
| name = "test_telegram_bot" | |
| version = "0.1.0" | |
| authors = ["darkmentat"] | |
| [dependencies] | |
| telegram-bot = { git = "https://github.com/telegram-rs/telegram-bot.git" } | |
| tokio-core = "0.1" | |
| futures = "0.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package vk | |
| import "errors" | |
| var ( | |
| ErrVkTooManyRequestsPerSecond = errors.New("Vk error, code: 6, msg: Too many requests per second") | |
| ErrVkUndefinedError = errors.New("Vk error undefined") | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var r = API.friends.get({"user_id": Args.user_id, "count" : "24", "offset": Args.offset, "fields": "domain"}); | |
| var friends = []; | |
| var i = 0; | |
| while(i < r.items.length){ | |
| var ff = API.friends.get({"user_id": r.items[i].id}); | |
| friends.push({ | |
| "id": r.items[i].id, | |
| "first_name": r.items[i].first_name, | |
| "last_name": r.items[i].last_name, |