|
@@ -130,7 +130,7 @@ bot = commands.Bot(
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
#Loading Cogs
|
|
#Loading Cogs
|
|
|
-async def load_extensions():
|
|
|
|
|
|
|
+def load_extensions():
|
|
|
cogs_dir = "./cogs"
|
|
cogs_dir = "./cogs"
|
|
|
if bot.guilds:
|
|
if bot.guilds:
|
|
|
channel = discord.utils.get(bot.guilds[0].channels, id=int(channel_log))
|
|
channel = discord.utils.get(bot.guilds[0].channels, id=int(channel_log))
|
|
@@ -143,12 +143,10 @@ async def load_extensions():
|
|
|
try:
|
|
try:
|
|
|
bot.load_extension(f"cogs.{cog_list}")
|
|
bot.load_extension(f"cogs.{cog_list}")
|
|
|
print(f"Loaded cog: {cog_list}")
|
|
print(f"Loaded cog: {cog_list}")
|
|
|
- if bot.guilds and channel:
|
|
|
|
|
- await channel.send(f"Loaded Cogs: {cog_list}")
|
|
|
|
|
|
|
+ channel.send(f"Loaded Cogs:{cog_list}")
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
print(f"Failed to load cog {cog_list}: {e}")
|
|
print(f"Failed to load cog {cog_list}: {e}")
|
|
|
- if bot.guilds and channel:
|
|
|
|
|
- await channel.send(f"Failed to load cog {cog_list}: {e}")
|
|
|
|
|
|
|
+ channel.send(f"Failed to load cog {cog_list}: {e}")
|
|
|
|
|
|
|
|
class Admin(commands.Cog):
|
|
class Admin(commands.Cog):
|
|
|
def __init__(self, bot):
|
|
def __init__(self, bot):
|
|
@@ -173,14 +171,13 @@ async def on_ready():
|
|
|
if channel:
|
|
if channel:
|
|
|
await channel.send(f"{bot.user} is online")
|
|
await channel.send(f"{bot.user} is online")
|
|
|
bot.add_view(PersistentRoleView()) #loading reactionrole memory
|
|
bot.add_view(PersistentRoleView()) #loading reactionrole memory
|
|
|
- await load_extensions()
|
|
|
|
|
- print("Registered Slash-Commands:")
|
|
|
|
|
|
|
+ print("Registrierte Slash-Commands:")
|
|
|
|
|
+ await channel.send("Registered Slash-Commands:")
|
|
|
for command in bot.pending_application_commands:
|
|
for command in bot.pending_application_commands:
|
|
|
print(f" - {command.name}")
|
|
print(f" - {command.name}")
|
|
|
- if bot.guilds and channel:
|
|
|
|
|
- await channel.send("Registered Slash-Commands:")
|
|
|
|
|
- await channel.send(f"- {command.name}")
|
|
|
|
|
|
|
+ await channel.send(f"- {command.name}")
|
|
|
|
|
|
|
|
|
|
+
|
|
|
#---------------------------------------------------------------------------------------#
|
|
#---------------------------------------------------------------------------------------#
|
|
|
#DONT Touch anything above this line, unless you know what you are doing!#
|
|
#DONT Touch anything above this line, unless you know what you are doing!#
|
|
|
#---------------------------------------------------------------------------------------#
|
|
#---------------------------------------------------------------------------------------#
|