Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d1a5b0d

Browse files
updated event
1 parent 3bd243e commit d1a5b0d

File tree

2 files changed

+27
-11
lines changed

2 files changed

+27
-11
lines changed

‎index.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import os
2+
import discord
3+
4+
from utils import default
5+
from utils.data import Bot, HelpFormat
6+
7+
config = default.config()
8+
print("Logging in...")
9+
10+
bot = Bot(
11+
command_prefix=config["prefix"], prefix=config["prefix"],
12+
owner_ids=config["owners"], command_attrs=dict(hidden=True), help_command=HelpFormat(),
13+
allowed_mentions=discord.AllowedMentions(roles=False, users=True, everyone=False),
14+
intents=discord.Intents( # kwargs found at https://discordpy.readthedocs.io/en/latest/api.html?highlight=intents#discord.Intents
15+
guilds=True, members=True, messages=True, reactions=True, presences=True
16+
)
17+
)
18+
19+
for file in os.listdir("cogs"):
20+
if file.endswith(".py"):
21+
name = file[:-3]
22+
bot.load_extension(f"cogs.{name}")
23+
24+
try:
25+
bot.run(config["token"])
26+
except Exception as e:
27+
print(f'Error when logging in: {e}')

‎main.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /