Skip to content

Commit 90c8e8f

Browse files
committed
Allow import this for all
1 parent e1aa55d commit 90c8e8f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

‎CHANGELOG‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
# Note: last records on top
77
#
88

9+
Version 0.3.4 20170613
10+
* Allow import this for all
11+
912
Version 0.3.3 20170426
1013
* Fix answer fo non-text message
1114

‎bot/main.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ async def ping(chat, message):
5151
awaitchat.reply("pong")
5252

5353

54-
@bot.moderator_command("/?import __hello__")
54+
@bot.command("/?import __hello__")
5555
asyncdefhello(chat: Chat, message):
5656
awaitsend_code(chat, " Hello world")
5757

5858

59-
@bot.moderator_command("/?import this")
59+
@bot.command("/?import this")
6060
asyncdefzen(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):
118118
returnresp.status==200
119119

120120

121-
@bot.moderator_command("\#.*pep-?(?P<pep>\d{1,4})")
121+
@bot.command("\#.*pep-?(?P<pep>\d{1,4})")
122122
asyncdefpeps(chat: Chat, matched):
123123
try:
124124
pep=int(matched.group('pep'))
@@ -128,6 +128,7 @@ async def peps(chat: Chat, matched):
128128
ifawaitis_pep_exists(pep):
129129
awaitchat.send_text(pep_link.format(pep), reply_to_message_id=chat.message["message_id"])
130130

131+
131132
if__name__=="__main__":
132133
logger.info("Running...")
133134
bot.run(debug=DEBUG)

0 commit comments

Comments
(0)