update
This commit is contained in:
1 parent
0fa2422f0b
commit
c1b6544962
5 files changed
+295
-39
No files matched your search
+8
-1
@@ -84,6 +84,10 @@ class Main(commands.Cog):
|
||||
def __init__(self, bot: Brahmos):
|
||||
self.bot = bot
|
||||
|
||||
@commands.Cog.listener()
|
||||
async def on_ready(self):
|
||||
logger.warning(f"Logged in as {self.bot.user} (ID: {self.bot.user.id})")
|
||||
|
||||
@commands.command(aliases=["p"])
|
||||
async def ping(self, ctx):
|
||||
"""Returns bot's latency."""
|
||||
@@ -174,9 +178,12 @@ class Main(commands.Cog):
|
||||
|
||||
@commands.command(name="restart", hidden=True)
|
||||
@commands.is_owner()
|
||||
async def restart(self, ctx: commands.Context, *, id):
|
||||
async def restart(self, ctx: commands.Context, id: Optional[int]=0):
|
||||
"""restart bot"""
|
||||
await ctx.message.add_reaction("\u2611")
|
||||
# stop the bot
|
||||
logger.warn("closing the bot")
|
||||
self.bot.close()
|
||||
os.system(f"pm2 restart {id}")
|
||||
|
||||
@commands.command(name="git")
|
||||
|
||||
Reference in new issue
Block a user