-
Notifications
You must be signed in to change notification settings - Fork 0
/
logosshorties.py
62 lines (44 loc) · 1.57 KB
/
logosshorties.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import emoji
import re
def id(bot, update):
chatid = update.message.chat_id
update.message.reply_text(chatid)
def sendphotohelper(bot, update, chat_id, photo):
if photo != "":
if photo.find("http") == -1:
bot.sendChatAction(chat_id, 'upload_photo')
bot.sendPhoto(chat_id=chat_id,
photo=open(photo, 'rb'))
else:
bot.sendChatAction(chat_id, 'upload_photo')
update.message.reply_photo(photo)
def sendhelper(bot, update, chatid, printable, tyyppi):
if printable != "":
if tyyppi == "photo":
sendphotohelper(bot, update, int(chatid), printable)
else:
update.message.reply_text(printable)
def usrname(bot, update):
usrnme = update.message.from_user.username
usrnme = "@", usrnme
usrnme = "".join(usrnme)
return usrnme
def apple(bot, update):
update.message.reply_text(emoji.emojize(":gem_stone:"))
def android(bot, update):
update.message.reply_text(emoji.emojize(":pile_of_poo:"))
def kääretorttu(bot, update):
chatid = update.message.chat_id
bot.sendVideo(chat_id=chatid, video=open("RickAstley-NeverGonnaGiveYouUp.mp4", 'rb'))
def num(bot, update, args):
x = ""
for i in range(len(args)):
word = args[i]
word = re.sub("o", "0", word)
word = re.sub("i", "1", word)
word = re.sub("e", "3", word)
word = re.sub("a", "4", word)
word = re.sub("s", "5", word)
word = re.sub("t", "7", word)
x = x + " " + word
update.message.reply_text(x)