Add systemd service and update capability
This commit is contained in:
parent
a5b5189e52
commit
a8169108b8
3 changed files with 34 additions and 0 deletions
|
|
@ -78,6 +78,19 @@ async def ping(ctx: lightbulb.Context) -> None:
|
|||
)
|
||||
await ctx.respond(embed)
|
||||
|
||||
@plugin.command
|
||||
@lightbulb.add_checks(lightbulb.owner_only)
|
||||
@lightbulb.command("update", "update the bot!", ephemeral=True)
|
||||
@lightbulb.implements(lightbulb.SlashCommand)
|
||||
async def update(ctx: lightbulb.Context) -> None:
|
||||
if (await get_git_status())['dev'] is False:
|
||||
await create_subprocess("git", "pull")
|
||||
embed = hikari.Embed(title="Restarting",
|
||||
description="Restarting to load an update!"
|
||||
)
|
||||
await ctx.respond(embed)
|
||||
await ctx.bot.close()
|
||||
|
||||
@plugin.command
|
||||
@lightbulb.command("info", "get bot information such as the version, and repository link.", ephemeral=True)
|
||||
@lightbulb.implements(lightbulb.SlashCommand)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue