flash / variables.py
dragxd's picture
Update variables.py
ab622b2 verified
raw
history blame
3.05 kB
# https://github.com/Infamous-Hydra/YaeMiko
# https://github.com/Team-ProjectCodeX
import json
import os
def get_user_list(config, key):
with open("{}/Mikobot/{}".format(os.getcwd(), config), "r") as json_file:
return json.load(json_file)[key]
class Config(object):
# Configuration class for the bot
# Enable or disable logging
LOGGER = True
# <================================================ REQUIRED ======================================================>
# Telegram API configuration
API_ID = 21188444 # Get this value from my.telegram.org/apps
API_HASH = "031ff911c40173e28290e2f44fcb4b56"
# Database configuration (PostgreSQL)
DATABASE_URL = "postgres://avnadmin:[email protected]:28525/defaultdb?sslmode=require"
# Event logs chat ID and message dump chat ID
EVENT_LOGS = -1002287972008
MESSAGE_DUMP = -1002287972008
# MongoDB configuration
MONGO_DB_URI = "mongodb+srv://flash:[email protected]/?retryWrites=true&w=majority&appName=flash"
# Support chat and support ID
SUPPORT_CHAT = "musiclogsdrag"
SUPPORT_ID = -1002287972008
# Database name
DB_NAME = "dragbot"
# Bot token
TOKEN = "8165112418:AAEYAzv_pKXsa-4YLF2cKmtPtRjqFwDgiWc" # Get bot token from @BotFather on Telegram
# Owner's Telegram user ID (Must be an integer)
OWNER_ID = 5907205317
# <=======================================================================================================>
# <================================================ OPTIONAL ======================================================>
# Optional configuration fields
# List of groups to blacklist
BL_CHATS = []
# User IDs of sudo users, dev users, support users, tiger users, and whitelist users
DRAGONS = get_user_list("elevated_users.json", "sudos")
DEV_USERS = get_user_list("elevated_users.json", "devs")
DEMONS = get_user_list("elevated_users.json", "supports")
TIGERS = get_user_list("elevated_users.json", "tigers")
WOLVES = get_user_list("elevated_users.json", "whitelists")
# Toggle features
ALLOW_CHATS = True
ALLOW_EXCL = True
DEL_CMDS = True
INFOPIC = True
# Modules to load or exclude
LOAD = []
NO_LOAD = []
# Global ban settings
STRICT_GBAN = True
BAN_STICKER = (
"CAACAgUAAxkBAAEGWC5lloYv1tiI3-KPguoH5YX-RveWugACoQ4AAi4b2FQGdUhawbi91DQE"
)
# Temporary download directory
TEMP_DOWNLOAD_DIRECTORY = "./"
# <=======================================================================================================>
# <=======================================================================================================>
class Production(Config):
# Production configuration (inherits from Config)
# Enable or disable logging
LOGGER = True
class Development(Config):
# Development configuration (inherits from Config)
# Enable or disable logging
LOGGER = True