GLaDOS/proposal/main.py

23 lines
571 B
Python

# Import the library
from ircapi import Bot
# Create a new bot
my_bot = Bot(
credentials=("Bob", "MySuperPassword") # Use any method you want to import secrets
server=('irc.planet-casio.com', 6697) # Define the IRC server
channels=["#general", "#fun"], # Auto-join those channels
history=100 # Keep last 100 messages received
)
# Register a simple command on the main file
@my_bot.command("!ping"):
def cmd_pong(msg):
my_bot.send(msg.to, "Pong!")
# Or import them from another file(s)
import commands
import dynamic
import help
import history