mirror of
https://github.com/polyjitter/searchbot-discord.git
synced 2024-08-14 22:46:55 +00:00
Changed Maintenance check
This commit is contained in:
parent
c1d35fadbf
commit
26b3cfbd83
1 changed files with 3 additions and 1 deletions
4
main.py
4
main.py
|
@ -46,6 +46,7 @@ class Bot(commands.Bot):
|
|||
# Utils
|
||||
for ext in os.listdir('extensions/utils'):
|
||||
if ext.endswith('.py'):
|
||||
print(ext)
|
||||
try:
|
||||
bot.load_extension(f'extensions.utils.{ext[:-3]}')
|
||||
self.extensions_list.append(
|
||||
|
@ -131,6 +132,7 @@ class Bot(commands.Bot):
|
|||
msg += f"OWNER: {self.appinfo.owner}\n"
|
||||
msg += "-----------------------------\n"
|
||||
print(msg)
|
||||
|
||||
await self.logging.info(content=msg, name="On Ready")
|
||||
|
||||
async def on_message(self, message):
|
||||
|
@ -150,7 +152,7 @@ class Bot(commands.Bot):
|
|||
return
|
||||
|
||||
# Maintenance mode
|
||||
elif self.maintenance and not message.author.is_owner():
|
||||
elif self.maintenance and not message.author.id == bot.appinfo.owner.id:
|
||||
return
|
||||
|
||||
# Empty ping for assistance
|
||||
|
|
Loading…
Reference in a new issue