oh wow that was easy to fix actually
This commit is contained in:
1 parent
8ce5412f9d
commit
e0a5c9cc0b
4 files changed
+9
-17
No files matched your search
@@ -1,4 +1,5 @@
|
|||||||
.env
|
.env
|
||||||
*.pyc
|
*.pyc
|
||||||
*.pyd
|
*.pyd
|
||||||
|
*__pycache__/
|
||||||
poetry.lock
|
poetry.lock
|
||||||
@@ -29,6 +29,7 @@ libs = [
|
|||||||
"lib.mod",
|
"lib.mod",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def get_prefix(bot, message):
|
def get_prefix(bot, message):
|
||||||
|
|
||||||
prefixes = ["?"]
|
prefixes = ["?"]
|
||||||
@@ -40,18 +41,17 @@ class Bot(commands.Bot):
|
|||||||
async def on_ready(self):
|
async def on_ready(self):
|
||||||
for lib in libs:
|
for lib in libs:
|
||||||
try:
|
try:
|
||||||
bot.load_extension(lib)
|
await bot.load_extension(lib)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f'[!] Failed to load extension: {lib}')
|
print(f"[!] Failed to load extension: {lib}")
|
||||||
traceback.print_exc()
|
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:
|
# for guild in bot.guilds:
|
||||||
# await bot.tree.sync(guild=discord.Object(id=guild.id))
|
# await bot.tree.sync(guild=discord.Object(id=guild.id))
|
||||||
# print(f"[^] Sync'd application commands to {len(bot.guilds)} servers")
|
# 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))
|
game = discord.Game(name="https://traps.moe", activity=random.randint(0, 3))
|
||||||
await bot.change_presence(status=discord.Status.online, activity=game)
|
await bot.change_presence(status=discord.Status.online, activity=game)
|
||||||
print("------")
|
print("------")
|
||||||
@@ -59,10 +59,10 @@ class Bot(commands.Bot):
|
|||||||
|
|
||||||
if sys.platform == "Linux":
|
if sys.platform == "Linux":
|
||||||
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.new_event_loop()
|
||||||
else:
|
else:
|
||||||
asyncio.set_event_loop_policy(winloop.EventLoopPolicy())
|
asyncio.set_event_loop_policy(winloop.EventLoopPolicy())
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.new_event_loop()
|
||||||
|
|
||||||
bot = Bot(
|
bot = Bot(
|
||||||
command_prefix=get_prefix,
|
command_prefix=get_prefix,
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
from discord.ext import commands
|
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():
|
def check_bot():
|
||||||
async def predicate(ctx):
|
async def predicate(ctx):
|
||||||
return not ctx.author.bot
|
return not ctx.author.bot
|
||||||
|
|||||||
+2
-2
@@ -78,5 +78,5 @@ class Mod(commands.Cog):
|
|||||||
|
|
||||||
await ctx.send(content=content,delete_after=15.0)
|
await ctx.send(content=content,delete_after=15.0)
|
||||||
|
|
||||||
def setup(bot):
|
async def setup(bot):
|
||||||
bot.add_cog(Mod(bot))
|
await bot.add_cog(Mod(bot))
|
||||||
Reference in new issue
Block a user