Skip to content

Commit

Permalink
Ah
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonymousX1025 authored Dec 17, 2022
1 parent b314b96 commit 72f373e
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@AnonymousR1025
* @AnonymousX1025
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
__pycache__/
.gitattributes
*.pyc
test.py
.env
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 AnonymousR1025
Copyright (c) 2022 AnonymousX1025

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
25 changes: 8 additions & 17 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sᴛʀɪɴɢ sᴇssɪᴏɴ ɢᴇɴᴇʀᴀᴛᴏʀ",
"description": "A Telegram Bot to generate Telethon and Pyrogram String Sessions.",
"name": "sᴇssɪᴏɴ ɢᴇɴᴇʀᴀᴛᴏʀ",
"description": "A Telegram Bot to generate Telethon and Pyrogram String Session.",
"logo": "https://telegra.ph/file/654ddaf472f18b799600b.jpg",
"keywords": [
"telegram",
Expand All @@ -11,21 +11,7 @@
"buildpacks": [{
"url": "heroku/python"
}],
"formation": {
"worker": {
"quantity": 1,
"size": "free"
}
},
"addons": [
{
"options": {
"version": "12"
},
"plan": "heroku-postgresql"
}
],
"repository": "https://github.com/AnonymousR1025/StringGenBot",
"repository": "https://github.com/AnonymousX1025/StringGenBot",
"env": {
"ENVIRONMENT": {
"description": "Don't change ANYTHING.",
Expand All @@ -47,6 +33,11 @@
"required": true,
"value": ""
},
"MONGO_DB_URI" {
"description": "Get this value from cloud.mongodb.com",
"required": true,
"value": ""
},
"MUST_JOIN": {
"description": "Username of a group or channel for which you want to set force sub.(without @)",
"required": true,
Expand Down
10 changes: 5 additions & 5 deletions bot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import env
import config
import logging
from pyrogram import Client, idle
from pyromod import listen # type: ignore
Expand All @@ -9,10 +9,10 @@
)

app = Client(
"bot",
api_id=env.API_ID,
api_hash=env.API_HASH,
bot_token=env.BOT_TOKEN,
"Anonymous",
api_id=config.API_ID,
api_hash=config.API_HASH,
bot_token=config.BOT_TOKEN,
in_memory=True,
plugins=dict(root="StringGenBot"),
)
Expand Down
14 changes: 14 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from os import getenv
from dotenv import load_dotenv

load_dotenv()

API_ID = getenv("API_ID", "")
API_HASH = getenv("API_HASH", "")

BOT_TOKEN = getenv("BOT_TOKEN", "")
LOGGER_ID = int(getenv("LOGGER_ID"))
OWNER_ID = int(getenv("OWNER_ID"))

MONGO_DB_URI = getenv("MONGO_DB_URI")
MUST_JOIN = getenv("MUST_JOIN", None)
24 changes: 0 additions & 24 deletions data.py

This file was deleted.

33 changes: 0 additions & 33 deletions env.py

This file was deleted.

12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
python-dotenv==0.21.0
SQLAlchemy==1.4.41
psycopg2==2.9.3
Telethon==1.25.2
dnspython==2.2.1
motor==3.1.1
pyromod==1.5
pyrogram==2.0.62
pyrogram1==0.*
TgCrypto==1.2.3
pyrogram==2.0.57
python-dotenv==0.21.0
telethon==1.25.4
TgCrypto==1.2.5
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.10.4
python-3.10.9
4 changes: 2 additions & 2 deletions .env.sample → sample.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
API_ID=
API_HASH=
BOT_TOKEN=
DATABASE_URL=
MUST_JOIN=
OWNER_ID=
MONGO_DB_URI=

0 comments on commit 72f373e

Please sign in to comment.