File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 66# Note: last records on top
77#
88
9+ Version 0.3.4 20170613
10+ * Allow import this for all
11+
912Version 0.3.3 20170426
1013 * Fix answer fo non-text message
1114
Original file line number Diff line number Diff line change @@ -51,12 +51,12 @@ async def ping(chat, message):
5151await chat .reply ("pong" )
5252
5353
54- @bot .moderator_command ("/?import __hello__" )
54+ @bot .command ("/?import __hello__" )
5555async def hello (chat : Chat , message ):
5656await send_code (chat , " Hello world" )
5757
5858
59- @bot .moderator_command ("/?import this" )
59+ @bot .command ("/?import this" )
6060async def zen (chat : Chat , message ):
6161# TODO: fetch it from chat_zen_url = "https://raw.githubusercontent.com/spbpython/orgs-wiki/master/chat/this.md"
6262
@@ -118,7 +118,7 @@ async def is_pep_exists(pep):
118118return resp .status == 200
119119
120120
121- @bot .moderator_command ("\#.*pep-?(?P<pep>\d{1,4})" )
121+ @bot .command ("\#.*pep-?(?P<pep>\d{1,4})" )
122122async def peps (chat : Chat , matched ):
123123try :
124124pep = int (matched .group ('pep' ))
@@ -128,6 +128,7 @@ async def peps(chat: Chat, matched):
128128if await is_pep_exists (pep ):
129129await chat .send_text (pep_link .format (pep ), reply_to_message_id = chat .message ["message_id" ])
130130
131+
131132if __name__ == "__main__" :
132133logger .info ("Running..." )
133134bot .run (debug = DEBUG )
You can’t perform that action at this time.
0 commit comments