Add systemd service and update capability

This commit is contained in:
Riley Housden 2022-08-19 22:35:30 -04:00
parent a5b5189e52
commit a8169108b8
Signed by: InValidFire
GPG key ID: 0D6208F6DF56B4D8
3 changed files with 34 additions and 0 deletions

View file

@ -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)