ChattyPy is a library made in Python for making Chatty bots.
Project description
Chatty.py
Chatty.py is a library made in Python for making Chatty bots.
Example
For a simple example, see example.py. An even simpler example is shown bellow:
import chatty
bot = chatty.Bot(name='example-bot', channel='hangout')
@bot.on_ready
def on_ready():
print('Bot ready!')
@bot.on_message
def on_message(msg):
print('User', msg.author, 'sent message:', msg)
@bot.on_command
def on_command(cmd):
print('User', cmd.author, 'sent slash command:', cmd)
if cmd.cmd == 'help':
bot.send_msg(f'Help requested by @{cmd.author.name}')
bot.run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
chattypy-0.1.3.tar.gz
(15.2 kB
view hashes)
Built Distribution
chattypy-0.1.3-py3-none-any.whl
(14.9 kB
view hashes)