-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjeanne.py
45 lines (36 loc) · 1.36 KB
/
jeanne.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
import csv
from discord.ext.commands import AutoShardedBot, when_mentioned_or
from discord import Intents, AllowedMentions
from os import listdir
from config import TOKEN
class Jeanne(AutoShardedBot):
async def setup_hook(self):
dirs = ["./events", "./cogs"]
for i in dirs:
for filename in listdir(i):
if filename.endswith(".py"):
await self.load_extension(f"{i[2:]}.{filename[:-3]}")
print(f"{i}.{filename} loaded")
else:
print(f"Unable to load {i}.{filename[:-3]}")
await self.load_extension("jishaku")
await self.tree.sync()
intents = Intents.all()
intents.presences = False
intents.voice_states = False
intents.auto_moderation = False
bot = Jeanne(
command_prefix=when_mentioned_or("J!", "j!", "Jeanne", "jeanne"), intents=intents
)
bot.allowed_mentions = AllowedMentions.all()
bot.case_insensitive = True
bot.strip_after_prefix = True
bot.remove_command("help")
@bot.event
async def on_ready():
print("Connected to bot: {}".format(bot.user.name))
print("Bot ID: {}".format(bot.user.id))
print("Connected to {} servers".format(len(bot.guilds)))
print("Listening to {} users".format(len(bot.users)))
print("Listening to {} shards".format(bot.shard_count))
bot.run(TOKEN)