-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
75 lines (63 loc) · 1.91 KB
/
main.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
from asyncore import loop
import random
import time
import discord
from discord.ext import commands
import os
from pystyle import *
blue = Col.blue
cyan = Col.cyan
#------------CONFIG------------
TOKEN = ""
prefix = "."
allowed = 1137704471154143354
title = "Cloud Pfps"
desc = ""
footer = "github.com/Bobbbyyyyy"
color = 0x92cace
banner = """
┏ ┏┓┓ ┓ ┓
┃ ┃ ┃┏┓┓┏┏┫ ┃
┛ ┗┛┗┗┛┗┻┗┻ ┗
"""
#------------------------------
os.system("cls")
os.system(f'title Cloud Pfps / Made by Bobbyyy')
System.Size(70, 20)
Cursor.HideCursor()
tostop = 0
intents = discord.Intents.all()
pfpbot = commands.Bot(command_prefix=prefix,intents=intents)
def randnum(fname):
lines=open(fname).read().splitlines()
return random.choice(lines)
@pfpbot.event
async def on_ready():
os.system('cls')
print(Colorate.Horizontal(Colors.blue_to_cyan, Center.XCenter(banner), 1))
print(cyan, Center.XCenter(f"Connected to {pfpbot.user}"))
@pfpbot.command()
async def stop(ctx):
global tostop
if ctx.author.id == allowed:
tostop += 1
await ctx.reply("`✅` | **Stopped AutoPfP**")
print(cyan, Center.XCenter(f"Stopped AutoPfP"))
else:
await ctx.reply("`⛔` | **You are not allowed to do that**")
@pfpbot.command()
async def start(ctx):
global tostop
if ctx.author.id == allowed:
tostop = 0
await ctx.reply("`✅` | **Started AutoPfP**")
print(cyan, Center.XCenter(f"Started AutoPfP"))
while tostop == 0:
embed = discord.Embed(title = title,description = desc,color = color)
embed.set_image(url = randnum('pfps.txt'))
embed.set_footer(text = footer)
await ctx.send(embed=embed)
time.sleep(3)
else:
await ctx.send("`⛔` | **You are not allowed to do that**")
pfpbot.run(TOKEN)