Update sweebridge.py
This commit is contained in:
parent
0aeb09c2c6
commit
61bd60b654
1 changed files with 11 additions and 1 deletions
|
@ -452,7 +452,7 @@ class MyClient(discord.Client):
|
|||
libera_channel = None
|
||||
libera_enable = False
|
||||
print(f'Message from {message.author} ({message.author.id}) on {message.channel.id}: {message.content}')
|
||||
if not message.author.bot:
|
||||
if message.author[-5:] != "#0000":
|
||||
if message.content != None and message.content != "":
|
||||
if message.content[:3] == "/me" or message.content[:4] == "b$me":
|
||||
await message.delete()
|
||||
|
@ -496,6 +496,16 @@ class MyClient(discord.Client):
|
|||
if libera_enable: libera.send_irc(libera_channel, liste[:-2])
|
||||
hook(discwebhook, json={"content": liste[:-2]})
|
||||
if guilded_enable: hook(gilwebhook, json={"content": "[Everyone here should already know who's in this server lmao]"})
|
||||
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 len(message.attachments) > 0:
|
||||
liste = ""
|
||||
guild_liste = ""
|
||||
|
|
Loading…
Reference in a new issue