Coder Social home page Coder Social logo

irc-bot's Introduction

Personal IRC bot

About The Project

A simple IRC bot which allows easily integrating new commands. See the Extending for information on how to add new plugins.

Screenshot

Built With

Getting Started

Prerequisites

  • Docker
  • Docker-compose

Installation

  1. Run docker-compose up

Usage

Create a .env file (see .env.example) with the required environment or change the environments in docker-compose.yaml.

Extending

New commands may be added by creating a new command file in src/modules, and implementing the following class:

from core.plugins import Plugin, register_plugin

@register_plugin(
    name="weather", description="check the weather", arguments="amsterdam paris ..."
)
class CommandName(Plugin):
    async def __call__(self, msg: Sequence[str]) -> str:
        ...

This will create a new command on the name of weather. The command supports multiple cities to be queried. For example, user X sends commandname arg1 arg2, thus msg will be [arg1, arg2].

TODOs

  • Add test cases. This started as one simple main.py, so I didn't care much on testing.
  • Add more usable plugins

License

Distributed under the MIT License. See LICENSE for more information.

irc-bot's People

Contributors

benmezger avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.