Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private ChatWithBot[long] chats;
- ChatWithBot createChat(Update u)
- {
- const chatId = u.chatId;
- ChatWithBot ret;
- ChatWithBot* found = (chatId in chats);
- if(found is null)
- {
- ret = new ChatWithBot(u);
- chats[chatId] = ret;
- }
- else
- {
- ret = *found;
- import std.stdio; writeln(ret);
- ret.incUpdate(u);
- }
- return ret;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement