全部 新建

user:thomas 由使用者建立的 Gists

title:mygist Gists 的標題

filename:myfile.txt Gists 的檔案名稱

extension:yml Gists 的副檔名

language:go Gists 的程式語言

topic:homelab gists with given topic

註冊

登錄


全部 新建 註冊 登錄

admin

加入 1 month ago

倒序排序 創建
順序排序 創建
倒序排序 更新
順序排序 更新
所有 Gists 2

admin / .js

0 喜歡
0 分支
1 檔案
最後活躍 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 喜歡
0 分支
1 檔案
最後活躍 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)) {
上一頁 下一頁

由 Opengist 提供支持 ⋅ Load: 34ms⋅

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