j0ack / discirc Goto Github PK
View Code? Open in Web Editor NEWmirrored from https://git.joakode.fr/joack/discirc
Home Page: http://docs.joakode.fr/discirc/
License: GNU General Public License v3.0
mirrored from https://git.joakode.fr/joack/discirc
Home Page: http://docs.joakode.fr/discirc/
License: GNU General Public License v3.0
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
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": ["~", "!"]
}
This is beyond my knowledge of IRC protocol to diagnose and fix myself.
Rizon's #help
channel suggested that it may be related to their first ping being sent sooner than it used to be sent (a recent change). I don't understand enough of what is going on in discirc to know the timing on these things so I can't check into that.
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.
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.
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.
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'
For now you need to prefix all the messages you want to send as private messages with usernames.
The goal of this feature is to create a channel for each private messages to prefix only first message with username.
https://github.com/j0ack/discirc/blob/master/discirc/irc_bot.py#L75
This violates the RFC and therefore doesn't work.
A "PASS" command is not required for either client or server
connection to be registered, but it must precede the server message
or the latter of the NICK/USER combination
Reordering these lines properly does work. :-)
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/
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 .
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.
friend suggests to add a flood delay between messages to avoid flood disconnects from irc, or my idea -_- a reconnect on drop .
Create an optional config key ircPass
to send password at irc authentication.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.