Token in .env

main
Bandie 2 years ago
parent c0ccb1642d
commit 0a762ebacc
No known key found for this signature in database
GPG Key ID: 843D7FA93BA46312

@ -0,0 +1 @@
TOKEN=''

2
.gitignore vendored

@ -0,0 +1,2 @@
.env
config.yml

@ -1,7 +1,5 @@
#!/usr/bin/python3
TOKEN=''
from dotenv import dotenv_values
from telegram import Update, Chat, ChatMember, ParseMode, ChatMemberUpdated, BotCommand
from telegram.ext import Updater, CommandHandler, ChatMemberHandler, CallbackContext, MessageHandler, Filters
import telegram
@ -9,17 +7,15 @@ import logging
import os.path
import yaml
TOKEN=dotenv_values()['TOKEN']
configFilename='config.yml'
config = {}
reply_markup = None
bot = telegram.Bot(token=TOKEN)
updater = Updater(token=TOKEN, use_context=True)
dispatcher = updater.dispatcher
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO)
def loadConfig():
if(os.path.isfile(configFilename)):

Loading…
Cancel
Save