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
@@ -1,4 +1,5 @@
|
||||
.env
|
||||
*.pyc
|
||||
*.pyd
|
||||
*__pycache__/
|
||||
poetry.lock
|
||||
@@ -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,
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
from discord.ext import commands
|
||||
|
||||
# Copyright (C) Flumboni - All Rights Reserved
|
||||
# Unauthorized copying of this file, via any medium is strictly prohibited
|
||||
# Proprietary and confidential
|
||||
def check_flum():
|
||||
async def predicate(ctx):
|
||||
ids = [320825953154760704, 344273597612818444, 274983796414349313]
|
||||
return ctx.author.id not in ids
|
||||
return commands.check(predicate)
|
||||
|
||||
def check_bot():
|
||||
async def predicate(ctx):
|
||||
return not ctx.author.bot
|
||||
|
||||
+2
-2
@@ -78,5 +78,5 @@ class Mod(commands.Cog):
|
||||
|
||||
await ctx.send(content=content,delete_after=15.0)
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(Mod(bot))
|
||||
async def setup(bot):
|
||||
await bot.add_cog(Mod(bot))
|
||||
Reference in new issue
Block a user