made imports clearer

pull/29/head
Mallory Hancock 2018-02-07 10:33:30 -08:00
parent 9bc48c3de9
commit 95513d21a1
4 changed files with 16 additions and 12 deletions

View File

@ -11,9 +11,9 @@ $ pip install pinhook
To create the bot, just create a python file with the following:
```python
import pinhook.bot
from pinhook.bot import Bot
bot = pinhook.bot.Bot(
bot = Bot(
channels=['#foo', '#bar'],
nickname='ph-bot',
server='irc.freenode.net'
@ -36,9 +36,9 @@ Optional arguments are:
Pinhook has a baked in way to connect directly to a twitch channel
```python
import pinhook.bot
from pinhook.bot import TwitchBot
bot = pinhook.bot.TwitchBot(
bot = TwitchBot(
nickname='ph-bot',
channel='#channel',
token='super-secret-oauth-token'

View File

@ -20,9 +20,9 @@ To create the bot, just create a python file with the following:
.. code:: python
import pinhook.bot
from pinhook.bot import Bot
bot = pinhook.bot.Bot(
bot = Bot(
channels=['#foo', '#bar'],
nickname='ph-bot',
server='irc.freenode.net'
@ -53,9 +53,9 @@ Pinhook has a baked in way to connect directly to a twitch channel
.. code:: python
import pinhook.bot
from pinhook.bot import TwitchBot
bot = pinhook.bot.TwitchBot(
bot = TwitchBot(
nickname='ph-bot',
channel='#channel',
token='super-secret-oauth-token'

View File

@ -1,6 +1,6 @@
import pinhook.bot
from pinhook.bot import Bot
ph = pinhook.bot.Bot(
ph = Bot(
channels=['#dicechannel'],
nickname='dicebot',
server='irc.freenode.net',

View File

@ -1,4 +1,8 @@
import pinhook.bot
from pinhook.bot import TwitchBot
bot = pinhook.bot.TwitchBot('dicebot', '#dicechannel', 'supersecrettokenhere')
bot = TwitchBot(
nickname='dicebot',
channel='#dicechannel',
token='supersecrettokenhere'
)
bot.start()