Skip to content

Commit

Permalink
Pre release fix
Browse files Browse the repository at this point in the history
  • Loading branch information
slipeer committed May 17, 2017
1 parent 1e52528 commit 0b43925
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
18 changes: 9 additions & 9 deletions matrix_bot/plugins/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from matrix_bot.mbot.plugins import Plugin
from matrix_bot.mbot.plugins import Plugin, admin_only
import logging
# TODO you can use KeyValueStore or RoomContextStore clases
# to store plugin data
Expand Down Expand Up @@ -58,15 +58,15 @@ def cmd_default(self, event, *args):
# self.tr.detect_lang("any user provided string")
# detected language stored in self.tr.lang
translated = self.tr.trans("some text")
# TODO you can write to log
log.info("Translated text %s" % translated)
# TODO you can write to log
log.info("Translated text %s" % translated)

# TODO you can revert translation
# This action redetects users language
# and update self.tr.lang
source_string = self.tr.untrans(translated)
# TODO you can write to log
log.info("Revert translation result %s" % source_string)
# TODO you can write to log
log.info("Revert translation result %s" % source_string)

# TODO return something
# returned value will be posted as notice
Expand Down Expand Up @@ -97,8 +97,8 @@ def on_msg(self, event, body):
create it from matrix API call
self.matrix.send_message"""

# TODO you can check if message consist resort to bot
if is_mentioned(body):
# TODO you can write to log
log.info("I was approached %s" % is_mentioned(body))
# TODO you can check if message consist resort to bot
if is_mentioned(body):
# TODO you can write to log
log.info("I was approached %s" % is_mentioned(body))
pass
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def read(fname):
"matrix_client",
"Flask",
"python-dateutil",
"gettext",
"langdetect"
],
dependency_links=[
Expand Down

0 comments on commit 0b43925

Please sign in to comment.