Compare commits
2 Commits
6da9d07fbe
...
d0cb0dffa0
Author | SHA1 | Date |
---|---|---|
jmjl | d0cb0dffa0 | |
jmjl | fcf69686bf |
|
@ -1,30 +0,0 @@
|
|||
import math
|
||||
import json
|
||||
import time
|
||||
|
||||
from pinhook import plugin as p
|
||||
|
||||
with open('emojis.json', 'r', encoding='utf-8') as e:
|
||||
emojis = json.load(e)
|
||||
|
||||
emojis = sorted(emojis.items(), key=lambda x: x[0])
|
||||
|
||||
emoji_list = {}
|
||||
c = 0
|
||||
for k,v in emojis:
|
||||
emoji_list[str(c)] = v
|
||||
c += 1
|
||||
|
||||
@p.command('&emojitime')
|
||||
def emojitime(msg):
|
||||
e_len = len(emoji_list)
|
||||
now = int(time.time() * 100)
|
||||
s = math.floor(now % e_len)
|
||||
s = emoji_list[str(s)]
|
||||
|
||||
m = math.floor((now % e_len**2)/e_len)
|
||||
m = emoji_list[str(m)]
|
||||
|
||||
h = math.floor((now % e_len**3)/e_len**2)
|
||||
h = emoji_list[str(h)]
|
||||
return p.message(u':'.join([h,m,s]))
|
|
@ -4,5 +4,5 @@ from pinhook import plugin as p
|
|||
@p.command('!rollcall', help_text="The rollcall command to introduce the bot to newcomers")
|
||||
@p.command('&ju', help_text="&ju so people can get infor for this bot specificaly")
|
||||
def rollcall(msg):
|
||||
out = "Beep boop, i'm a bot from jmjl. I currently can show you the date join and leave channels, if you need more, be sure to make a pr on git~town/jmjl/juju. I also have current music but that's broken. -|- News: I'm doing !tilde now as krowbar's bot's offline."
|
||||
out = "Beep boop, i'm a bot from jmjl. If you'd like the command list run &help."
|
||||
return p.message(out)
|
||||
|
|
|
@ -4,7 +4,7 @@ emoji~=0.4.5
|
|||
geopy~=1.11.0
|
||||
markovify~=0.7.1
|
||||
nltk>~3.4.5
|
||||
pinhook~=1.5
|
||||
pinhook~=1.10
|
||||
python-forecastio~=1.3.5
|
||||
requests>~2.20.0
|
||||
tvdb-api~=1.10
|
||||
|
|
Loading…
Reference in New Issue