This repository has been archived by the owner on Dec 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patht2.temp
95 lines (82 loc) · 2.72 KB
/
t2.temp
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
@bot.command(name="blacklist", aliases=['bl'])
@commands.is_owner()
async def blacklist(ctx, id, app=None):
id = get_id_from_mention(id)
if id == 736147895039819797:
await ctx.send("Nou.")
return
else:
pass
try:
await getusr(id)
todo = "User"
except NotFound:
bot.get_guild
if app is not None:
dets = f"{app}_{id}\n"
tosend = f"Blacklisted role `{id} : {await getrl(id).name}` for app `{app}`"
else:
dets = f"gbl_{id}\n"
tosend = f"Blacklisted role `{id} : {await getrl(id).name}` globally."
try:
await bot.fetch_user(id)
pass
except NotFound:
try:
if app is not None:
with open(r"bl\rl_blacklists.txt") as file:
if dets in file.readlines():
await ctx.send("Already Blacklisted")
return
else:
pass
with open(r"bl\rl_blacklists.txt", "a") as f:
f.write(dets)
pass
else:
with open(r"bl\rl_blacklists.txt") as file:
if dets in file.readlines():
await ctx.send("Already Blacklisted")
return
else:
pass
with open(r"bl\rl_blacklists.txt", "a") as f:
f.write(dets)
pass
if app is not None:
await ctx.send(tosend)
asyncio.create_task(log(tosend, ctx))
else:
await ctx.send(tosend)
asyncio.create_task(log(tosend, ctx))
return
except HTTPException:
await ctx.send("Error, could you please re-run the command")
return
if app is not None:
with open(r"bl\usr_blacklists.txt") as file:
if dets in file.readlines():
await ctx.send("Already Blacklisted")
return
else:
pass
with open(r"bl\usr_blacklists.txt", "a") as f:
f.write(dets)
pass
else:
with open(r"bl\usr_blacklists.txt") as file:
if dets in file.readlines():
await ctx.send("Already Blacklisted")
return
else:
pass
with open(r"bl\usr_blacklists.txt", "a") as f:
f.write(dets)
pass
if write_blacklist_user(id, app):
if app is not None:
await ctx.send(tosend)
asyncio.create_task(log(tosend, ctx))
else:
await ctx.send(tosend)
asyncio.create_task(log(tosend, ctx))