-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
49 lines (32 loc) · 948 Bytes
/
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
import discord
from discord.ext import commands
from config import *
class BlurpleProfile(commands.Bot):
async def setup_hook(self):
initial_extensions = [
'owner',
'profile'
]
for extension in initial_extensions:
await bot.load_extension(extension)
intents = discord.Intents.all()
description = "Blurple Profile"
get_pre = lambda bot, message: BOT_PREFIX
bot = BlurpleProfile(command_prefix=get_pre, description=description, intents=intents)
bot.recent_cog = None
bot.tasks = {}
@bot.event
async def on_connect():
print('Loaded Discord')
@bot.event
async def on_ready():
print('------')
print('Logged in as')
print(bot.user.name)
print(bot.user.id)
print(discord.utils.utcnow().strftime("%d/%m/%Y %I:%M:%S:%f"))
print('------')
@bot.check
async def globally_block_dms(ctx):
return ctx.guild is not None
bot.run(TOKEN, reconnect=True)