-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
71 lines (61 loc) · 2.23 KB
/
main.py
File metadata and controls
71 lines (61 loc) · 2.23 KB
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
import settings
import discord
from discord.ext import commands
import asyncio
from cogs.admin import *
from cogs.faqs import *
from cogs.fun import *
from cogs.memes import *
from cogs.general import *
from cogs.help import *
from cogs.ideas import *
from cogs.logs import *
from cogs.mod import *
from cogs.minecraft import *
from cogs.voice_channels import *
from utils.packmcmeta import update_mcmeta_info
logger = settings.logging.getLogger("bot")
cogs = [
DebugCommand, EditCommand, PingCommand, StatusCommands,
FAQs,
EnchantCommands, LookForCommand, RandomCommands, DeadChat, TikTokCommand,
SoyjakCommand, DemotivatorCommand, SpeechbubbleCommand, BruhCommand, GifCommand, ImpactCommand,
HelpCommand, LinkCommand, Pin, StarterMessage, SyntaxCommand, AskToResolve, Tickets,
JoinAndLeaveMessage, SayCommand, ServerInfoCommand, BotPing, DeleteBotMessage,
Logs, IdeaVoteReactions,
ClearCommand, PunishmentCommands, AutoThreads, AntiSpamBot,
SnapshotScraper, ColorCommand, FileCommand, MessageFormatter, PackformatCommand,
CustomVoiceChannels
]
views = [
LookForView, TiktokImageView,
GifizeView, StarterMessageLayout,
CreateTicketMessage, FileLayout
]
class AntBot(commands.Bot):
def __init__(self, *, intents: discord.Intents, command_prefix: str):
super().__init__(intents=intents, command_prefix=commands.when_mentioned_or(command_prefix), case_insensitive=True)
async def setup_hook(self):
update_mcmeta_info.start()
#
self.remove_command("help")
for cog in cogs:
await self.add_cog(cog(self))
for view in views:
self.add_view(view())
await self.tree.sync()
HelpCog = self.get_cog("HelpCommand")
HelpCog.all_features.update({command.name: command.aliases for command in sorted(self.commands, key=lambda cmd: cmd.name)})
del HelpCog.all_features['debug']
logger.info(f"User: {bot.user} (ID: {bot.user.id})")
try:
with open("assets/pfps/online.png", "rb") as file:
await bot.user.edit(avatar=file.read())
except:
logger.warn("pfp ratelimit")
intents = discord.Intents.all()
bot = AntBot(command_prefix="!", intents=intents)
# @bot.tree.command()
# async def saygex(Interaction: discord.Interaction):
# await Interaction.response.send_message("say gex")
bot.run(settings.DISCORD_API_SECRET, root_logger=True)