forked from TeamUltroid/UltroidAddons
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrypto.py
More file actions
186 lines (168 loc) · 6.55 KB
/
crypto.py
File metadata and controls
186 lines (168 loc) · 6.55 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
"""
✘ Commands Available
• `{i}cp <cryptocurrency>`
Gives Price Of Cryptocurrency.
• `{i}cgas`
Gives Gas Of Eth Cryptocurrency.
• `{i}ccalc <cryptocurrency>`
Calculates Cryptocurrency.
Eg: .calc eth 200
• `{i}cindex`
Gives Index Of Cryptocurrency.
• `{i}cdefi`
Gives Defi Of Cryptocurrency.
• `{i}ccap <cryptocurrency>`
Gives MartketCap.
• `{i}clink <cryptocurrency>`
Gives Official SocialMedia Links/Links Of Cryptocurrency.
• `{i}cvol <cryptocurrency>`
Gives Vol Of Cryptocurrency.
• `{i}cgoogle <cryptocurrency>`
Gives GoogleTrend Of Cryptocurrency.
Made By @Senku_ishigamiii
"""
from telethon import events
from telethon.errors.rpcerrorlist import YouBlockedUserError
from telethon.tl.functions.account import UpdateNotifySettingsRequest
from . import *
@ultroid_cmd(pattern="cp(.*)$")
async def demn(ult):
input = ult.pattern_match.group(1)
chat = "@Cryptowhalebot"
await ult.edit("Please Wait")
async with ult.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(incoming=True, from_users=331761115))
await ult.client.send_message(chat, f"/p {input}")
response = await response
except YouBlockedUserError:
await ult.reply("Boss! Please Unblock @Cryptowhalebot")
return
x = response.text
z = x.split("\n")[(len(x.split("\n")))-1]
await eor(ult, x.replace(z,""))
@ultroid_cmd(pattern="cgas(.*)$")
async def demn(ult):
input = ult.pattern_match.group(1)
chat = "@Cryptowhalebot"
await ult.edit("Please Wait")
async with ult.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(incoming=True, from_users=331761115))
await ult.client.send_message(chat, f"/gas {input}")
response = await response
except YouBlockedUserError:
await ult.reply("Boss! Please Unblock @Cryptowhalebot")
return
x = response.text
z = x.split("\n")[(len(x.split("\n")))-1]
await eor(ult, x.replace(z,""))
@ultroid_cmd(pattern="ccalc(.*)$")
async def demn(ult):
input = ult.pattern_match.group(1)
chat = "@Cryptowhalebot"
await ult.edit("Please Wait")
async with ult.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(incoming=True, from_users=331761115))
await ult.client.send_message(chat, f"/calc {input}")
response = await response
except YouBlockedUserError:
await ult.reply("Boss! Please Unblock @Cryptowhalebot")
return
x = response.text
z = x.split("\n")[(len(x.split("\n")))-1]
await eor(ult, x.replace(z,""))
@ultroid_cmd(pattern="cindex$")
async def demn(ult):
chat = "@Cryptowhalebot"
await ult.edit("Please Wait")
async with ult.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(incoming=True, from_users=331761115))
await ult.client.send_message(chat, f"/index")
response = await response
except YouBlockedUserError:
await ult.reply("Boss! Please Unblock @Cryptowhalebot")
return
x = response.text
z = x.split("\n")[(len(x.split("\n")))-1]
await eor(ult, x.replace(z,""))
@ultroid_cmd(pattern="cdefi$")
async def demn(ult):
chat = "@Cryptowhalebot"
await ult.edit("Please Wait")
async with ult.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(incoming=True, from_users=331761115))
await ult.client.send_message(chat, f"/defi")
response = await response
except YouBlockedUserError:
await ult.reply("Boss! Please Unblock @Cryptowhalebot")
return
x = response.text
await eor(ult, x)
@ultroid_cmd(pattern="ccap(.*)$")
async def demn(ult):
input = ult.pattern_match.group(1)
chat = "@Cryptowhalebot"
await ult.edit("Please Wait")
async with ult.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(incoming=True, from_users=331761115))
await ult.client.send_message(chat, f"/cap {input}")
response = await response
except YouBlockedUserError:
await ult.reply("Boss! Please Unblock @Cryptowhalebot")
return
x = response.text
z = x.split("\n")[(len(x.split("\n")))-1]
await ult.reply(x.replace(z,""), file=response.media)
@ultroid_cmd(pattern="clink(.*)$")
async def demn(ult):
input = ult.pattern_match.group(1)
chat = "@Cryptowhalebot"
await ult.edit("Please Wait")
async with ult.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(incoming=True, from_users=331761115))
await ult.client.send_message(chat, f"/link {input}")
response = await response
except YouBlockedUserError:
await ult.reply("Boss! Please Unblock @Cryptowhalebot")
return
x = response.text
await eor(ult, x)
@ultroid_cmd(pattern="cvol(.*)$")
async def demn(ult):
input = ult.pattern_match.group(1)
chat = "@Cryptowhalebot"
await ult.edit("Please Wait")
async with ult.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(incoming=True, from_users=331761115))
await ult.client.send_message(chat, f"/vol {input}")
response = await response
except YouBlockedUserError:
await ult.reply("Boss! Please Unblock @Cryptowhalebot")
return
x = response.text
z = x.split("\n")[(len(x.split("\n")))-1]
await eor(ult, x.replace(z,""))
@ultroid_cmd(pattern="cgoogle(.*)$")
async def demn(ult):
input = ult.pattern_match.group(1)
chat = "@Cryptowhalebot"
await ult.edit("Please Wait")
async with ult.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(incoming=True, from_users=331761115))
await ult.client.send_message(chat, f"/google {input}")
response = await response
except YouBlockedUserError:
await ult.reply("Boss! Please Unblock @Cryptowhalebot")
return
x = response.text
z = x.split("\n")[(len(x.split("\n")))-1]
await ult.reply(input, file=response.media)
HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})