Git Product home page Git Product logo

discirc's Introduction

DiscIRC

build

DiscIRC is a bot that syncs messages between Discord and IRC. It's written in Python using the discord.py and bottom libraries.

Installation

You can install it simply using `pip`:

$ pip install discirc

Use

Launch

You first need to configure DiscIRC thanks to a config file. By default DiscIRC tries to load a ~/.discirc file, if not present you need to give it to the app with the -- config option.

To create a valid config file please see the example.

Then simply run DiscIRC thanks to the available command:

$ discirc

Private messages

DiscIRC handles private messages. You need to prefix your message with a @User when sent from Discord and with User: from IRC.

discirc's People

Contributors

anyrepo avatar teotwawki avatar tmarki avatar zurgeg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

discirc's Issues

Reconnect after disconnect

The program is disconnecting from the IRC server (Freenode) about every hour, even without any messages being sent.

Reconnecting after the connection has been lost would fix this issue.

Tested on Ubuntu Server 18.04

No incomming msgs from irc to discord

Hello , from discord to irc everything shows perfect but nothing from irc to discord , I'm running it on a centos 7 dedicated vps , any recommendations ?
config being used:

{
"_comments": "Discord app token",
"discordToken": "secret you shouldn't paste it here",

"_comments": "IRC server address",
"ircServer": "irc.quakenet.org",

"_comments": "IRC server port",
"ircPort": "6667",

"_comments": "IRC SSL use",
"ircSSl": false,

"_comments": "IRC nick",
"ircNick": "discirc",

"_comments": "IRC nick password [OPTIONAL]",
"ircPass": "MyIRCPass",

"_comments": "Channels maps",
"mappingChannels": {
"gauntlet-party": "#sohva"
},

"_comments": "IRC channel passwords [OPTIONAL]",
"channelPass": {
"#irc_chan1": "ChannelPass2",
"#irc_chan2": "ChannelPass2"
},

"_comments": "Command chars to not interpret",
"commandChars": ["~", "!"]
}

Need some sort of feedback when commands like channel join fail

Ok so I've been running this all week, been pretty satisfied with it. Today suddenly after restarting the server it lives on, it can't join any IRC channels. I can't diagnose it because there are no errors at all. It simply never ducking joins. I can tell its actually connected by sending info requests and messaging it directly - its on the network, just not in channel. It connects to discord just fine. Even transmits private messages from discord to IRC just fine, Just doesn't join channel anymore. And I control the channel I am testing on - its not blocked, As I said it was working fine all week and I have changed nothing.

Is this project dead?

I'm asking because it looks like the discord/discordpy API changed, and this project doesn't reflect it, and doesn't pin dependencies, causing it to fail.

For example:

future: <Task finished coro=<DiscordWrapper.on_irc_message() done, defined at /home/ircbot/.local/lib/python3.7/site-packages/discirc/discord_bot.py:90> exception=AttributeError("'Client' object has no attribute 'send_message'")>
Traceback (most recent call last):
  File "/home/ircbot/.local/lib/python3.7/site-packages/discirc/discord_bot.py", line 112, in on_irc_message
    await self.bot.send_message(target, msg)
AttributeError: 'Client' object has no attribute 'send_message'

User list, idea

Possible to include a user list command ? for example from irc ( could be privet msg from bot to client )
users: rolename
and the bot grabs the users inside the role name entered
and from discord
@users ircChannelname
displaying all the users inside the irc channel entered .
Would be very helpful .

json doesn't do comments

Your example file will lead inexperienced users to create broken configs and then be confused as to why it isn't working. Also you have an extra comma on line 14. If you want ``//comments` you will need something to strip those out before feeding it to the json decoder.

irc Flood disconnect

friend suggests to add a flood delay between messages to avoid flood disconnects from irc, or my idea -_- a reconnect on drop .

ImportError: cannot import name 'TYPE_CHECKING'

C:\Users\Admin
λ discirc
Traceback (most recent call last):
  File "c:\users\admin\appdata\local\programs\python\python35\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\admin\appdata\local\programs\python\python35\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python35\Scripts\discirc.exe\__main__.py", line 5, in <module>
  File "c:\users\admin\appdata\local\programs\python\python35\lib\site-packages\discirc\launcher.py", line 31, in <module>
    from discirc.irc_bot import IRCBot
  File "c:\users\admin\appdata\local\programs\python\python35\lib\site-packages\discirc\irc_bot.py", line 24, in <module>
    import bottom
  File "c:\users\admin\appdata\local\programs\python\python35\lib\site-packages\bottom\__init__.py", line 2, in <module>
    from bottom.client import Client
  File "c:\users\admin\appdata\local\programs\python\python35\lib\site-packages\bottom\client.py", line 5, in <module>
    from bottom.protocol import Protocol
  File "c:\users\admin\appdata\local\programs\python\python35\lib\site-packages\bottom\protocol.py", line 4, in <module>
    from typing import Optional, TYPE_CHECKING
ImportError: cannot import name 'TYPE_CHECKING'

Running on Python version 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)], and on a Windows-7-6.1.7601-SP1 machine.

Just configured the bot and tried to run it, but it doesn't work.

Won't connect to IRC server

Hello, I'm trying to bridge a channel on Freenode, however although the Discord bot starts up, the bridge doesn't connect to Freenode. My config worked a couple months ago, but for whatever reason it's stopped working now.

Help would be greatly appreciated.

FileNotFoundError: [Errno 2] No such file or directory: 'REQUIREMENTS.txt'

amici@laptop:~/Desktop$ pip3 install discirc
Collecting discirc
  Downloading discirc-0.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-htpp49c8/discirc/setup.py", line 26, in <module>
        for line in open('REQUIREMENTS.txt', 'r'):
    FileNotFoundError: [Errno 2] No such file or directory: 'REQUIREMENTS.txt'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-htpp49c8/discirc/

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.