Use .env file
This commit is contained in:
parent
2972cca582
commit
3e63c3b6e0
4
.env.example
Normal file
4
.env.example
Normal file
|
@ -0,0 +1,4 @@
|
|||
MATRIX_HOMESERVER_URL='https://matrix.org'
|
||||
MATRIX_FULL_USER_ID='@fckidiots:matrix.org'
|
||||
MATRIX_PASSWORD='...'
|
||||
TELEGRAM_BOT_TOKEN='5890667880:...'
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/.env
|
|
@ -1,15 +1,16 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import asyncio
|
||||
import os
|
||||
import sys
|
||||
|
||||
import aiogram as telegram
|
||||
import nio as matrix
|
||||
|
||||
MATRIX_HOMESERVER_URL = 'https://matrix.org'
|
||||
MATRIX_FULL_USER_ID = '@fckidiots:matrix.org'
|
||||
MATRIX_PASSWORD = '...'
|
||||
TELEGRAM_BOT_TOKEN = '5890667880:...'
|
||||
MATRIX_HOMESERVER_URL = os.environ['MATRIX_HOMESERVER_URL']
|
||||
MATRIX_FULL_USER_ID = os.environ['MATRIX_FULL_USER_ID']
|
||||
MATRIX_PASSWORD = os.environ['MATRIX_PASSWORD']
|
||||
TELEGRAM_BOT_TOKEN = os.environ['TELEGRAM_BOT_TOKEN']
|
||||
|
||||
async def main():
|
||||
try:
|
||||
|
|
Reference in a new issue