Weechat and Gitter - weechat

I am using Weechat. I know that Gitter has a IRC and from Weechat I am planning to connect to it. There are plenty of guides for Irssi, not for Weechat. However, I have tried to use similar commands to Irssi and I am getting errors.
How could I use Weechat with Gitter?

By following the following IRC Gitter guide:
/server add gitter irc.gitter.im -ssl -ssl_verify -ssl_dhkey_size=1024 -password=
/connect gitter
You get your token in this website. You log in and copy-paste the token with the password above. However, please note that it is very important to specify the nick as well. Otherwise, you could connect to Gitter but the service will throw the following error:
irc: reading data on socket: error 0 (connection closed by peer)
In order to avoid this problem, specify the nick:
/set irc.server.gitter.nicks "YOUR_NICK"

I'v successfully joined Gitter via Weechat but none of my channels show up in the sidebar and when I try to join one (i.e. /join #neoclide/coc.nvim nothing happens.

Related

Getting number of active voice connections

I usually work with discord.js but now I'm contributing to a package that supports discord.io too (it's dbots.js btw).
I need to post bot stats to discordbotlist's API and they support the number of active voice connections too: how can I get it in discord.io?
I've tried searching for properties and method in the docs but I can't find anything like discord.js' Client.voiceConnections.
Does anybody know how to find it?
The guy the owns the package figured it out:
Object.keys(client._vChannels).length

I set my telegram bot webhook, but do not send the telegram. Why?

I set webhook my telegram bot with setwebhook method but when I send a message in bot don't take this in my URL.
https://api.telegram.org/bot<token>/setwebhook?url=https://www.example.com/bot/temp.php
In my host I use PHP language for take and analysis and answer that. and I user this command for get updates from bot.
$update = file_get_contents(“php://input”);
But after run this line $update is empty.
I haven't problem with take updates without setwebhook bot when I use webhook don't take data.
result run getWebhookinfo is:
{"ok":true,"result":{"url":"https://example.com/bot/temp.php","has_custom_certificate":false,"pending_update_count":0,"max_connections":40}}
Do I have to be true "has_custom_cere"?
Thanks for help me
Mohammad, I think a PHP error occurred when telegram sends the request to you. Following code should works fine for getting the Telegram request.
$json = file_get_contents('php://input');
$request = json_decode($json);
I think your script stop before this code. I suggest you to enable PHP debug mode and check the error log.
You can find out problem via following method:
Check getWebhookInfo method, make sure your webhook URL is correct, and no last_error_message field.
POST similar data to your server, here is some data you can use in curl -d JSON, just copy it and run on your own server.
At last, check your CDN config (if you had applied on that server), temporary disable flooding or any check.
What is the outcome of the /getwebhookinfo method and could you post it here?
Please check if you SSL certificate valid (happend once to me) and what shows if you call the website in your browser (any php errors?).
I would have commented that, but I don´t have enough rep... Sorry :/
Please follow this way and if you don't get answer, your PHP has problem :
1- Revoke your Auth Key from BotFather by typing /revoke
2- Reset your Webbhook by new Auth Key :
https://api.telegram.org/bot<token>/setWebhook?url=https://www.website.com/bot_path
Notice #1 : setWebhook is case sensitive and W keyword must be capital.
Notice #2 : If you're using CMS such as Codeigniter, Laravel, Zend etc. It doesn't need to put .php after your bot_path and if not use it.
Notice #3 : If you want to delete last Webhook that you have set, You just need to write above url without ?url= at the rest.
3- After all you receive this message from telegram :
{"ok":true,"result":true,"description":"Webhook was set"}
Now you can test your Bot, But be aware that do this way to check your Auth Key and If there is no problem, absolutely your PHP code has problem. If you have problem yet please contact me on website to solve it Graphap and then put the right answer here.
I've told to recheck this way because I had problem frequently because of Auth Key which not working But now it works as well.

Node Red and telegram bot error

Firstly I want to say I am a novice to programming. But I want to learn. I do know logic and want to make things for myself using Node Red for IoT.
I was trying to figure out how do send messages to and from telegram through node red. So that once I can do that I can connect other devices that can listen to my messaged from telegram and be controlled via node red and vice-versa.
Here's what I have already done so far.
1. Installed both of the following modules in Node red
TelegramBot and Redbot(chatbot) via NPM and for this example I am using Redbot to send my message.
2. Setup a telegram bot successfully and got my API key for the bot
3. Got my API key and ChatID (which was really a Pita BTW)
4 I followed guide - https://www.npmjs.com/package/node-red-contrib-chatbot to setup my Node Red Flow. the basic flow which looks like this. NodeRed Flow
But my problem is when I send anything from my Telegram bot, NodeRed pick up something as I see the "Debug tab" updating. But it only says
"msg : string [44]Unable to find context().global in Node-RED"
When I click the error it takes me back to the instance of Telegram I setup already.
I know I am doing something wrong here but what is that I am just not sure. Can someone help. I am sure I am missing something very simple.
There is an open issue for this problem on the package's github page:
https://github.com/guidone/node-red-contrib-chatbot/issues/28
And a what looks like a pull request that will fix it:
https://github.com/guidone/node-red-contrib-chatbot/pull/29

Skype Echo Bot for NodeJS: Messages Not Appearing in Skype App

I am following this Echo Bot Tutorial, and have gone through all of the basic steps regarding setup and registration. I am following the steps (near the bottom) regarding local testing, and have been using ngrok successfully.
I was able to add my Skype Bot as a contact, and I also have the latest version of the Skype app (Mac). When I send a message to the bot via the Skype app, I see the message appear in the debug notes in my terminal window. So I know that the messages I type are coming through.
I also see this:
skype-sdk.MessagingServiceClientV2 Sending message to 8:username with content Hey 8:username. Thank you for your message: "test".
However, I do not see any kind of reply in my Skype application. My expectation is that the bot would echo back my message to me.
My questions are:
1) When testing locally using the ngrok method described in the tutorial, should I be able to see activity from the Skype bot (in terms of messages to me)?
2) I am guessing this may be some an authentication issue? How can I best troubleshoot things, and get the Skype bot to actually respond in the Skype app?
I feel like I am incredibly close to getting this working, in that the messages I send are coming through... but the messages I expect from the Skype bot are not coming through. Any help or ideas greatly appreciated!
Found the fix, and posting it here should anyone else run into the same issue.
During the setup process, when I was using the Application Registration Portal, I selected the wrong string as my Application Secret.
Originally, I clicked on Generate New Key Pair, which resulted in a new entry appearing in the admin labeled Private Key. I used this string as my App Secret.
However, it appears that what I should have done was click on Generate New Password and used *that string instead**. Just gave it a try, and my bot is now responding back to me locally (in the Skype app), when testing with ngrok.
I think this particular distinction could have been made clearer in the documentation, as I lost a great deal of time due to this one oversight. Oh well, at least I can start developing now...

Implementing CTCP commands in an IRC bot (Haskell)

I have followed the tutorial on the Haskell wiki about implementing an IRC bot. and everything worked out fine. But once I started extending it, I realised that It would need to respond to CTCP requests from other users for commands like version and ping. These commands work for the server but not for the bot.
I read the rfc's for CTCP and for IRC clients but they are not very useful.
I did the following, but I don't think it is the required message:
write "PRIVMSG" (sender++"\001VERSION Haskellbot : v1.0 : GHCi\001")
This only asked for version information from the sender. So how do I go about implementing the return message for CTCP requests and other CTCP requests in general?
Upon closer inspection of the CTCP rfc, I solved it with:
write "NOTICE" (sender++"\001VERSION Haskellbot : v1.0 : GHCi\001")

Resources