All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Register

Login


All New Register Login

All gists

Recently created
Least recently created
Recently updated
Least recently updated

admin / .js

0 likes
0 forks
1 files
Last active 1 month ago
1 bot.callbackQuery(/^credit_confirm_(\d+)_(\d+)$/, async (ctx) => {
2 const chatInstance = ctx.update.callback_query.chat_instance;
3 const amount = parseInt(ctx.match[1], 10);
4 const targetUserId = parseInt(ctx.match[2], 10);
5 const userId = ctx.from.id;
6 const firstName = ctx.from.first_name;
7
8 if (userId !== targetUserId) {
9 return ctx.answerCallbackQuery({
10 text: "Это не твой кредит! Создай свой запрос.",

admin / index.js

0 likes
0 forks
1 files
Last active 1 month ago
1 const { Bot, InlineKeyboard } = require("grammy");
2 const fs = require("fs");
3 const path = require("path");
4
5 const bot = new Bot("");
6
7 const DB_PATH = path.join(__dirname, "db.json");
8
9 function getDb() {
10 if (!fs.existsSync(DB_PATH)) {
Newer Older

Powered by Opengist ⋅ Load: 36ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文