mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
fixmepls
This commit is contained in:
parent
fbf034d52b
commit
7160b367cf
1 changed files with 15 additions and 0 deletions
15
bot.py
15
bot.py
|
@ -295,6 +295,8 @@ def cv():
|
||||||
# Elenco di tutte le persone online su Discord
|
# Elenco di tutte le persone online su Discord
|
||||||
tosend = "*Su Discord ora:*\n"
|
tosend = "*Su Discord ora:*\n"
|
||||||
r = discord.getwidgetdata("176353500710699008")
|
r = discord.getwidgetdata("176353500710699008")
|
||||||
|
musicstatus = str()
|
||||||
|
musicchannel = str()
|
||||||
for member in r['members']:
|
for member in r['members']:
|
||||||
m = dict()
|
m = dict()
|
||||||
if 'bot' not in member or not member['bot']:
|
if 'bot' not in member or not member['bot']:
|
||||||
|
@ -329,6 +331,19 @@ def cv():
|
||||||
tosend += "{emoji} *{channelname}* {name}\n".format(**m)
|
tosend += "{emoji} *{channelname}* {name}\n".format(**m)
|
||||||
else:
|
else:
|
||||||
tosend += "{emoji} {name}\n".format(**m)
|
tosend += "{emoji} {name}\n".format(**m)
|
||||||
|
# Controlla se l'utente è royal music
|
||||||
|
elif 'id' == "176358898851250176":
|
||||||
|
if 'game' in member:
|
||||||
|
for channel in r['channels']:
|
||||||
|
if member['channel_id'] == channel['id']:
|
||||||
|
musicchannel = channel['name']
|
||||||
|
break
|
||||||
|
# Todo: migliorami
|
||||||
|
musicstatus = "{emoji} *{channelname}* {songname}\n".format(emoji="\U0001F3B5",
|
||||||
|
channelname=musicchannel,
|
||||||
|
songname=member['game']['name'])
|
||||||
|
if musicstatus != "":
|
||||||
|
tosend += musicstatus
|
||||||
telegram.sendmessage(tosend, sentin, source)
|
telegram.sendmessage(tosend, sentin, source)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue