-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathquotes.py
122 lines (100 loc) · 3.44 KB
/
quotes.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
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
import random
from random import choice
import requests
from . import *
@bot.on(d3vil_cmd(pattern=f"love$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"love$", allow_sudo=True))
async def love(e):
txt = random.choice(LOVESTR)
await eor(e, txt)
@bot.on(d3vil_cmd(pattern=f"dhoka$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"dhoka$", allow_sudo=True))
async def katgya(e):
txt = random.choice(DHOKA)
await eor(e, txt)
@bot.on(d3vil_cmd(pattern=f"metoo$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"metoo$", allow_sudo=True))
async def metoo(e):
txt = random.choice(METOOSTR)
await eor(e, txt)
@bot.on(d3vil_cmd(pattern=f"gdnoon$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"gdnoon$", allow_sudo=True))
async def noon(e):
txt = random.choice(GDNOON)
await eor(e, txt)
@bot.on(d3vil_cmd(pattern=f"chase$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"chase$", allow_sudo=True))
async def police(e):
txt = random.choice(CHASE_STR)
await eor(e, txt)
@bot.on(d3vil_cmd(pattern=f"congo$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"congo$", allow_sudo=True))
async def Sahih(e):
txt = random.choice(CONGRATULATION)
await eor(e, txt)
@bot.on(d3vil_cmd(pattern=f"qhi$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"qhi$", allow_sudo=True))
async def hoi(e):
txt = random.choice(D3VILOSTR)
await eor(e, txt)
@bot.on(d3vil_cmd(pattern=f"gdbye$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"gdbye$", allow_sudo=True))
async def bhago(e):
txt = random.choice(BYESTR)
await eor(e, txt)
@bot.on(d3vil_cmd(pattern=f"gdnyt$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"gdnyt$", allow_sudo=True))
async def night(e):
txt = random.choice(GDNIGHT)
await eor(e, txt)
@bot.on(d3vil_cmd(pattern=f"gdmng$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"gdmng$", allow_sudo=True))
async def morning(e):
txt = random.choice(GDMORNING)
await eor(e, txt)
@bot.on(d3vil_cmd(pattern="quote ?(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="quote ?(.*)", allow_sudo=True))
async def quote_search(event):
if event.fwd_from:
return
d3vil = await eor(event, "`Processing...`")
input_str = event.pattern_match.group(1)
if not input_str:
api_url = "https://quotes.cwprojects.live/random"
try:
response = requests.get(api_url).json()
except:
response = None
else:
api_url = f"https://quotes.cwprojects.live/search/query={input_str}"
try:
response = random.choice(requests.get(api_url).json())
except:
response = None
if response is not None:
await d3vil.edit(f"`{response['text']}`")
else:
await eod(d3vil, "`Sorry Zero results found`")
CmdHelp("quotes").add_command(
"quote", None, "Sends a random mind-blowing quote"
).add_command(
"gdmng", None, "Sends a random Good Morning Quote"
).add_command(
"gdnyt", None, "Sends a random Good Night Quote"
).add_command(
"gdbye", None, "Sends a random Good Byee Quote"
).add_command(
"qhi", None, "Sends a random Hello msg"
).add_command(
"congo", None, "Sends a random congratulations quote"
).add_command(
"chase", None, "Sends a random Chase quote"
).add_command(
"gdnoon", None, "Sends a random Good Afternoon quote"
).add_command(
"metoo", None, "Sends a text saying Mee too."
).add_command(
"dhoka", None, "Sends a random Dhoka quote(katt gya bc)"
).add_command(
"love", None, "Sends a random love quote🥰. (A stage before .dhoka)"
).add()