-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
53 lines (42 loc) · 1.27 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
import nextcord
import colorama
import aiohttp
import requests
from nextcord.ext import commands, tasks
from nextcord import Intents
from colorama import Fore, Back, Style, init
import os
import sys
import asyncio
import time
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
intents = nextcord.Intents.default()
intents.message_content = True
intents.members = True
colorama.init()
bot = commands.Bot(
command_prefix="-",
intents=intents,
help_command=None,
case_insensitive=True
)
botnormal = f"[{Fore.CYAN}-{Style.RESET_ALL}] "
botloading = f"[{Fore.GREEN}>>{Style.RESET_ALL}] "
boterror = f"[{Fore.RED}!{Style.RESET_ALL}] "
botwarn = f"[{Fore.YELLOW}:{Style.RESET_ALL}] "
botevent = f"[{Fore.GREEN}?{Style.RESET_ALL}] "
os.system("cls")
print(botnormal + " Connection...")
def cogsload():
for folder in ["commands"]:
for filename in os.listdir(folder):
if filename.endswith(".py"):
print(botloading + f"{filename[:-3]} a été chargé avec succès")
bot.load_extension(f"{folder}.{filename[:-3]}")
cogsload()
@bot.event
async def on_ready():
print(botnormal + " Connecté !")
print(botnormal + " En tant que : " + bot.user.name)
time.sleep(3)
bot.run("the token")