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
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import aiogram as telegram
|
import aiogram as telegram
|
||||||
import nio as matrix
|
import nio as matrix
|
||||||
|
|
||||||
MATRIX_HOMESERVER_URL = 'https://matrix.org'
|
MATRIX_HOMESERVER_URL = os.environ['MATRIX_HOMESERVER_URL']
|
||||||
MATRIX_FULL_USER_ID = '@fckidiots:matrix.org'
|
MATRIX_FULL_USER_ID = os.environ['MATRIX_FULL_USER_ID']
|
||||||
MATRIX_PASSWORD = '...'
|
MATRIX_PASSWORD = os.environ['MATRIX_PASSWORD']
|
||||||
TELEGRAM_BOT_TOKEN = '5890667880:...'
|
TELEGRAM_BOT_TOKEN = os.environ['TELEGRAM_BOT_TOKEN']
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
try:
|
try:
|
||||||
|
|
Reference in a new issue