Cordice Developers Open Cordice
Getting started

Using a library

Point your Telegram library at Cordice and keep the rest of the code.

Checked with aiogram 3.31, python-telegram-bot 22.8 and grammY 1: receiving updates, commands, buttons, editing, getChat, the menu button and webhooks.

aiogram 3

from aiogram import Bot
from aiogram.client.session.aiohttp import AiohttpSession
from aiogram.client.telegram import TelegramAPIServer

session = AiohttpSession(api=TelegramAPIServer.from_base("https://app.cordice.org/api/v1"))
bot = Bot(TOKEN, session=session)

python-telegram-bot

from telegram import Bot

bot = Bot(TOKEN, base_url="https://app.cordice.org/api/v1/bot")

grammY

import { Bot } from "grammy"

const bot = new Bot(TOKEN, { client: { apiRoot: "https://app.cordice.org/api/v1" } })

telegraf

import { Telegraf } from "telegraf"

const bot = new Telegraf(TOKEN, { telegram: { apiRoot: "https://app.cordice.org/api/v1" } })
IDs are strings. Python libraries convert them; in JavaScript keep them as strings and do not do arithmetic on them.