1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 21:44:21 +00:00

waaaaaaaaaaaaaaaaaaaaaa

This commit is contained in:
Steffo 2016-09-04 20:35:45 +02:00
parent b4d1d3a8f6
commit 6c7ad3d8e7

9
bot.py
View file

@ -292,11 +292,11 @@ def automah():
def cv(): def cv():
print("@" + username + ": /roll")
# 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() 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']:
@ -331,10 +331,9 @@ def cv():
# Controlla se l'utente è royal music # Controlla se l'utente è royal music
elif member['id'] == "176358898851250176": elif member['id'] == "176358898851250176":
if 'game' in member: if 'game' in member:
musicchannel = discord.getchannelname(r, member['channel_id']) musicstatus = "{emoji} *{channelname}* {songname}\n" \
musicstatus = "{emoji} *{channelname}* {songname}\n".format(emoji="\U0001F3B5", .format(emoji="\U0001F3B5", channelname=discord.getchannelname(r, member['channel_id']),
channelname=musicchannel, songname=member['game']['name'])
songname=member['game']['name'])
if musicstatus != "": if musicstatus != "":
tosend += musicstatus tosend += musicstatus
telegram.sendmessage(tosend, sentin, source) telegram.sendmessage(tosend, sentin, source)