mirror of
https://github.com/Floriansylvain/Risitas_BOT.git
synced 2026-08-19 11:43:16 +02:00
✨ - Introducing "update" command for CI purpose
This commit is contained in:
@@ -133,3 +133,6 @@ private.py
|
|||||||
|
|
||||||
# Generated JPEG File
|
# Generated JPEG File
|
||||||
acc.jpeg
|
acc.jpeg
|
||||||
|
|
||||||
|
# Script for CI
|
||||||
|
.sh
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ from time import time
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
from miscellaneous import spellchecker
|
from miscellaneous import spellchecker
|
||||||
|
import os, sys
|
||||||
import discord
|
import discord
|
||||||
|
|
||||||
|
|
||||||
@@ -44,6 +45,14 @@ async def unloadext(ctx, extension):
|
|||||||
await ctx.send("Extension unloaded.")
|
await ctx.send("Extension unloaded.")
|
||||||
|
|
||||||
|
|
||||||
|
@bot.command(hidden=True)
|
||||||
|
@commands.is_owner()
|
||||||
|
async def update(ctx):
|
||||||
|
result = os.popen('git pull')
|
||||||
|
await ctx.send(str(result.read()))
|
||||||
|
os.execl(sys.executable, os.path.abspath(__file__), *sys.argv)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
for extension in startup_extensions:
|
for extension in startup_extensions:
|
||||||
bot.load_extension('ext.' + extension)
|
bot.load_extension('ext.' + extension)
|
||||||
|
|||||||
Reference in New Issue
Block a user