Skip to content
Snippets Groups Projects
Commit e46d6ebb authored by Bruce Cowan's avatar Bruce Cowan
Browse files

Add unicode utils plugin

Also remove example one
parents
No related branches found
No related tags found
No related merge requests found
[Core]
module = unicode
name = Unicode
[Documentation]
description = Details about unicode characters
[Python]
version = 3
from errbot import BotPlugin, botcmd
class Unicode(BotPlugin):
"""Details about unicode characters"""
@botcmd
def ord(self, message, args):
"""Runs ord() on the characters given"""
return [ord(c) for c in args]
@botcmd
def chr(self, message, args):
"""Runs chr() on the numbers given"""
try:
return ''.join([chr(int(i)) for i in args.split()])
except ValueError as e:
return "Error: {}".format(e)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment