oh wow that was easy to fix actually
This commit is contained in:
1 parent
8ce5412f9d
commit
e0a5c9cc0b
4 files changed
+10
-18
No files matched your search
@@ -29,6 +29,7 @@ libs = [
|
||||
"lib.mod",
|
||||
]
|
||||
|
||||
|
||||
def get_prefix(bot, message):
|
||||
|
||||
prefixes = ["?"]
|
||||
@@ -40,18 +41,17 @@ class Bot(commands.Bot):
|
||||
async def on_ready(self):
|
||||
for lib in libs:
|
||||
try:
|
||||
bot.load_extension(lib)
|
||||
await bot.load_extension(lib)
|
||||
except Exception as e:
|
||||
print(f'[!] Failed to load extension: {lib}')
|
||||
print(f"[!] Failed to load extension: {lib}")
|
||||
traceback.print_exc()
|
||||
finally:
|
||||
print(f"\n[^] Loaded {len(libs)} extensions loaded successfully.")
|
||||
print(f"\n[^] Loaded {len(libs)} extensions loaded successfully.")
|
||||
|
||||
# for guild in bot.guilds:
|
||||
# await bot.tree.sync(guild=discord.Object(id=guild.id))
|
||||
# print(f"[^] Sync'd application commands to {len(bot.guilds)} servers")
|
||||
|
||||
print(f"[*] Logged in as {bot.user} (ID: {bot.user.id})")
|
||||
print(f"[*] I am {bot.user} (ID: {bot.user.id})")
|
||||
game = discord.Game(name="https://traps.moe", activity=random.randint(0, 3))
|
||||
await bot.change_presence(status=discord.Status.online, activity=game)
|
||||
print("------")
|
||||
@@ -59,10 +59,10 @@ class Bot(commands.Bot):
|
||||
|
||||
if sys.platform == "Linux":
|
||||
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
||||
loop = asyncio.get_event_loop()
|
||||
loop = asyncio.new_event_loop()
|
||||
else:
|
||||
asyncio.set_event_loop_policy(winloop.EventLoopPolicy())
|
||||
loop = asyncio.get_event_loop()
|
||||
loop = asyncio.new_event_loop()
|
||||
|
||||
bot = Bot(
|
||||
command_prefix=get_prefix,
|
||||
|
||||
Reference in new issue
Block a user