Telegram Bot Configuration (src/Configuration.php)

nutgram · src/Configuration.php · php · MIT
integration, chat, lang:php, tag:configuration, tag:nutgram

Configuration class for setting up Telegram bot parameters, caching, and logging. Use when initializing the Nutgram bot framework.

// Source: https://github.com/nutgram/nutgram | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.
<?php

namespace SergiX44\Nutgram;

use Closure;
use DateInterval;
use Laravel\SerializableClosure\SerializableClosure;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Psr\SimpleCache\CacheInterface;
use SergiX44\Hydrator\HydratorInterface;
use SergiX44\Nutgram\Cache\Adapters\ArrayCache;
use SergiX44\Nutgram\Hydrator\NutgramHydrator;

final readonly class Configuration
{
    public const DEFAULT_API_URL = 'https://api.telegram.org';
    public const DEFAULT_POLLING_TIMEOUT = 10;
    public const DEFAULT_POLLING_LIMIT = 100;
    public const DEFAULT_CLIENT_TIMEOUT = 5;
    public const DEFAULT_HYDRATOR = NutgramHydrator:

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key