Giter Site home page Giter Site logo

znc-bot's Introduction

znc-bot

znc-bot depends on a recent development build of ZNC compiled with modpython.

Installation

To install znc-bot you can copy the source files onto your znc modules directory, which can usually be found at ~/.znc/modules or /usr/lib/znc/modules.

Loading

Loading znc-bot

/msg *status loadmod bot

Once the core bot has been loaded you can load any included plugins.

/msg *status loadmod security
/msg *status loadmod rand

Bot API

from bot.api import *

class helloworld(Module):
    @command
    def hi(self, event, args):
        return "Hello there!"

Asyncronous HTTP

from bot.api import *

class trakt(Module):
    @command
    @http
    def trending(self, event, string):
        event.http('http://api.trakt.tv/movies/trending.json/my-api-key')

    @trending.http(200)
    def handle_trending(self, event, response):
        for movie in movies.json:
            event.write('{title} ({year}) - {overview}'.format(**movie)) 

znc-bot's People

Contributors

apmorton avatar kylef avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.