made imports clearer
parent
9bc48c3de9
commit
95513d21a1
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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()
|
Loading…
Reference in New Issue