Update sweebridge.py
This commit is contained in:
parent
09117fe53c
commit
cab9376bc2
1 changed files with 12 additions and 2 deletions
|
@ -204,9 +204,9 @@ def ircsession(platform:str, sock:bot_irc):
|
|||
if content.split(" ")[0] == "b$pull":
|
||||
updater = subprocess.run(["git", "pull"], stdout=subprocess.PIPE)
|
||||
if updater.stdout.decode().strip() == "Already up to date.":
|
||||
sock.send_irc(channel_irc, "[WARN] SweeBridge is already up-to-date.")
|
||||
sock.send_irc(channel_irc, "[⚠️] SweeBridge is already up-to-date.")
|
||||
else:
|
||||
sock.send_irc(channel_irc, "[OK] SweeBridge updated, restarting now!")
|
||||
sock.send_irc(channel_irc, "[✅] SweeBridge updated, restarting now!")
|
||||
global alive
|
||||
alive = False
|
||||
time.sleep(2)
|
||||
|
@ -417,6 +417,16 @@ async def on_message(message):
|
|||
else:
|
||||
if libera_enable: libera.send_irc(libera_channel, "Error: Discord is not set up in this community!")
|
||||
await message.reply("Error: Discord is not set up in this community!")
|
||||
if message.content.split(" ")[0] == "b$pull":
|
||||
updater = subprocess.run(["git", "pull"], stdout=subprocess.PIPE)
|
||||
if updater.stdout.decode().strip() == "Already up to date.":
|
||||
await message.reply("[⚠️] SweeBridge is already up-to-date.")
|
||||
else:
|
||||
await message.reply("[✅] SweeBridge updated, restarting now!")
|
||||
global alive
|
||||
alive = False
|
||||
time.sleep(2)
|
||||
sys.exit()
|
||||
if message.content[:13] == "b$chandetails" and not message.author.bot:
|
||||
await message.reply("* Server ID: " + message.server.id + "\n* Channel ID: " + message.channel.id)
|
||||
class MyClient(discord.Client):
|
||||
|
|
Loading…
Reference in a new issue