inx emoji
This commit is contained in:
parent
1b9c7ea744
commit
902c0b27de
1 changed files with 6 additions and 5 deletions
|
@ -14,14 +14,15 @@ class Ans(StdAns):
|
|||
return '我已知晓你希望 inx 停止.'
|
||||
if cmd == 'start':
|
||||
self.DATASET({'status':'1'})
|
||||
self.sendmsg('inx 启动!')
|
||||
# self.sendmsg('inx 启动!')
|
||||
pinx = 0
|
||||
pixic = 0
|
||||
pdji = 0
|
||||
while(self.DATAGET()['status'] == '1'):
|
||||
inx, ixic, dji = getMG()
|
||||
msg = '标普500 现在的涨跌幅度: ' + inx + ' ' + emoji(pinx,inx) + '纳斯达克现在的涨跌幅度: ' + ixic + ' ' + emoji(pixic,ixic) + '道琼斯指数现在的涨跌幅: ' + dji + ' ' + emoji(pdji,dji)
|
||||
self.sendmsg(msg)
|
||||
msg = '标普 500 : ' + inx + ' ' + emoji(pinx,inx) + '纳斯达克 : ' + ixic + ' ' + emoji(pixic,ixic) + '道琼斯指数: ' + dji + ' ' + emoji(pdji,dji)
|
||||
# self.sendmsg(msg)
|
||||
print(msg)
|
||||
pinx = inx
|
||||
pixic = ixic
|
||||
pdji = dji
|
||||
|
@ -41,9 +42,9 @@ def emoji(p,n):
|
|||
n = float(n)
|
||||
p = float(p)
|
||||
if n < p:
|
||||
emoji = '🟩🟩🟩🎉\n'
|
||||
emoji = '📉📉📉🎉\n'
|
||||
elif n > p:
|
||||
emoji = '🟥🟥🟥😢\n'
|
||||
emoji = '📈📈📈😢\n'
|
||||
else :
|
||||
emoji = '⬜⬜⬜🌚\n'
|
||||
return emoji
|
||||
|
|
Loading…
Reference in a new issue