commit
6daf8050b1
|
@ -1,18 +1,19 @@
|
||||||
from src.handler.commands.base import Base
|
from src.handler.commands.base import Base
|
||||||
from src.handler.commands.start import Start
|
|
||||||
from src.handler.commands.help import Help
|
|
||||||
from src.handler.commands.ping import Ping
|
|
||||||
from src.handler.commands.get_stats import GetStats
|
|
||||||
from src.handler.commands.moderate import Moderate
|
|
||||||
from src.handler.commands.chance import Chance
|
from src.handler.commands.chance import Chance
|
||||||
|
from src.handler.commands.get_stats import GetStats
|
||||||
|
from src.handler.commands.help import Help
|
||||||
|
from src.handler.commands.moderate import Moderate
|
||||||
|
from src.handler.commands.ping import Ping
|
||||||
|
from src.handler.commands.start import Start
|
||||||
|
|
||||||
from src.handler.commands.butts import Butts
|
|
||||||
from src.handler.commands.boobs import Boobs
|
from src.handler.commands.boobs import Boobs
|
||||||
from src.handler.commands.meow import Meow
|
|
||||||
from src.handler.commands.woof import Woof
|
|
||||||
from src.handler.commands.borscht import Borscht
|
from src.handler.commands.borscht import Borscht
|
||||||
from src.handler.commands.xkcd import XKCD
|
from src.handler.commands.butts import Butts
|
||||||
|
from src.handler.commands.facepalm import Facepalm
|
||||||
|
from src.handler.commands.meow import Meow
|
||||||
from src.handler.commands.vzhuh import Vzhuh
|
from src.handler.commands.vzhuh import Vzhuh
|
||||||
|
from src.handler.commands.woof import Woof
|
||||||
|
from src.handler.commands.xkcd import XKCD
|
||||||
|
|
||||||
commands = {}
|
commands = {}
|
||||||
for clazz in Base.__subclasses__():
|
for clazz in Base.__subclasses__():
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
from .base import Base
|
||||||
|
from urllib.request import urlopen, Request
|
||||||
|
|
||||||
|
|
||||||
|
class Facepalm(Base):
|
||||||
|
name = 'facepalm'
|
||||||
|
aliases = ['o']
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def execute(bot, command):
|
||||||
|
req = Request("http://loremflickr.com/500/410/facepalm", headers={'User-Agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"})
|
||||||
|
output = open("storage/facepalm.jpg", "wb")
|
||||||
|
output.write(urlopen(req).read())
|
||||||
|
output.close()
|
||||||
|
|
||||||
|
bot.send_photo(chat_id=command.chat_id, photo=open('storage/facepalm.jpg', 'rb'))
|
Loading…
Reference in New Issue