-
Notifications
You must be signed in to change notification settings - Fork 60
Configuration
The default option (production
) uses Webhook mode, you can set to development
to use polling mode.
API token of your bot, can be obtained from @BotFather.
Webhook URL to be set for Telegram server.
Webhook port, automatically set if on Heroku.
Local directory to store downloaded images, will be created if not exists.
Storage directory, can be local or remote, will be created if not exists.
Telegram channel ID used for storing files.
Telegram channel ID used for storing messages, messages sent to bot and containing URL entities will be forwarded here for reviewing.
Telegram user ID(not username) of the admin, separated by a comma, bot functions are restricted to admin user.
If ADMIN_ID
and ADMIN_USERNAME
are both unset, bot will become publicly available.
eg:
export ADMIN_ID=111111 # single admin
export ADMIN_ID=111111,222222,333333 # multiple admins
Tips:
- You can get your User ID & Channel ID via @GetIDs Bot
- You need to add your bot to channel administrators
Telegram username of the admin, separated by a comma, will not work if ADMIN_ID
is present.
If ADMIN_ID
and ADMIN_USERNAME
are both unset, bot will become publicly available.
eg:
export ADMIN_USERNAME=admin1 # single admin
export ADMIN_USERNAME=admin1,admin2,admin3 # multiple admins
Telegram group ID, separated by a comma. Users in this group will be able to use the bot in group chat.
Type of database.
Supported databases:
Driver | Usage | Config | Note |
---|---|---|---|
TinyDB | https://github.com/y-young/nazurin/wiki/TinyDB | Local |
Default |
Firestore | https://github.com/y-young/nazurin/wiki/Firestore | Firebase |
|
MongoDB | https://github.com/y-young/nazurin/wiki/MongoDB | Mongo |
MongoDB Atlas supported |
Cloudant | https://github.com/y-young/nazurin/wiki/Cloudant | Cloudant |
You can also implement your own database driver by creating a file under database
folder, and set this option to the name of driver class.
String, evaluated to list.
Type of storage, default is ['Local']
which only uses DOWNLOAD_DIR
as local storage.
Append the types of storage to the list, eg: ['Mega']
, ['Mega', 'GoogleDrive']
Supported storage:
Name | Usage | Config | Note |
---|---|---|---|
Local | Append 'Local' to STORAGE
|
'Local' |
Default |
MEGA | https://github.com/y-young/nazurin/wiki/MEGA | Mega |
|
Google Drive | https://github.com/y-young/nazurin/wiki/Google-Drive | GoogleDrive |
Implement other storage by creating a file under storage
with a store
function.