mirror of
https://github.com/RYGhub/royalnet.git
synced 2025-02-25 14:15:04 +00:00
robe
This commit is contained in:
parent
c75b32610e
commit
04e56780b0
1 changed files with 14 additions and 2 deletions
16
bot.py
16
bot.py
|
@ -8,6 +8,7 @@ import random
|
||||||
import osu
|
import osu
|
||||||
import lol
|
import lol
|
||||||
import discord
|
import discord
|
||||||
|
import subprocess
|
||||||
|
|
||||||
# Elenco di username dei membri della RYG
|
# Elenco di username dei membri della RYG
|
||||||
royalgames = json.loads(filemanager.readfile("db.json"))
|
royalgames = json.loads(filemanager.readfile("db.json"))
|
||||||
|
@ -23,6 +24,7 @@ ragelevel = 0
|
||||||
# Pepperoni secret
|
# Pepperoni secret
|
||||||
secretlevel = 0
|
secretlevel = 0
|
||||||
|
|
||||||
|
|
||||||
# Spostiamo qui le funzioni del bot, così è un po' più leggibile
|
# Spostiamo qui le funzioni del bot, così è un po' più leggibile
|
||||||
def wow():
|
def wow():
|
||||||
print("@" + username + ": WOW!")
|
print("@" + username + ": WOW!")
|
||||||
|
@ -483,6 +485,14 @@ def smecds():
|
||||||
telegram.sendmessage("Secondo me è colpa {accusato}...".format(accusato=accusato), sentin, source)
|
telegram.sendmessage("Secondo me è colpa {accusato}...".format(accusato=accusato), sentin, source)
|
||||||
|
|
||||||
|
|
||||||
|
def version():
|
||||||
|
# Visualizza la versione di Royal Bot
|
||||||
|
# Solo per UNIX...?
|
||||||
|
print("@" + username + ": /version")
|
||||||
|
msg = subprocess.run("git describe")
|
||||||
|
telegram.sendmessage(msg, sentin, source)
|
||||||
|
|
||||||
|
|
||||||
# Ciclo principale del bot
|
# Ciclo principale del bot
|
||||||
print("Bot avviato!")
|
print("Bot avviato!")
|
||||||
while True:
|
while True:
|
||||||
|
@ -544,7 +554,7 @@ while True:
|
||||||
osucmd()
|
osucmd()
|
||||||
elif text.startswith('/roll'):
|
elif text.startswith('/roll'):
|
||||||
roll()
|
roll()
|
||||||
elif text.startswith('/cv'):
|
elif text.startswith('/cv') or text.startswtih('/discord'):
|
||||||
cv()
|
cv()
|
||||||
elif text.startswith('/online'):
|
elif text.startswith('/online'):
|
||||||
online()
|
online()
|
||||||
|
@ -554,7 +564,7 @@ while True:
|
||||||
diario()
|
diario()
|
||||||
elif text.startswith('/leggi'):
|
elif text.startswith('/leggi'):
|
||||||
leggi()
|
leggi()
|
||||||
elif text.startswith('/lolfree'):
|
elif text.startswith('/lol'):
|
||||||
lolfree()
|
lolfree()
|
||||||
elif text.startswith('/ombromanto'):
|
elif text.startswith('/ombromanto'):
|
||||||
ombromanto()
|
ombromanto()
|
||||||
|
@ -564,6 +574,8 @@ while True:
|
||||||
smecds()
|
smecds()
|
||||||
elif text.startswith('/ciaospaggia'):
|
elif text.startswith('/ciaospaggia'):
|
||||||
ciaospaggia()
|
ciaospaggia()
|
||||||
|
elif text.startswith('/version'):
|
||||||
|
version()
|
||||||
else:
|
else:
|
||||||
print("@" + username + " bloccato.")
|
print("@" + username + " bloccato.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Add table
Reference in a new issue