import { Bot } from "https://deno.land/x/grammy/mod.ts"; import { CompiledConfig } from "../../cfg/config.ts"; import { Ctx } from "../ctx.ts"; export const init = (bot: Bot, _: CompiledConfig) => { bot.command("getchat", ctx => { if (!ctx.from || !ctx.message) return if (ctx.message.chat.type != "group" && ctx.message.chat.type != "supergroup") return ctx.deleteMessage() console.log(`Chat ${ctx.message.chat.title} ID: ${ctx.message.chat.id}`) }) bot.command("getme", ctx => { if (!ctx.from) return console.log(`User ${ctx.from.first_name} ${ctx.from.last_name} ID: ${ctx.from.id}`) }) }