yassienw / kik-node-api Goto Github PK
View Code? Open in Web Editor NEWAn API for creating kik bots (and other stuff)
License: GNU Affero General Public License v3.0
An API for creating kik bots (and other stuff)
License: GNU Affero General Public License v3.0
talk1110an.kik.com is down
'iqHandler.js':
Within 'if(xmlns === "jabber:iq:roster")':
This will add "users_data", "total" and "ispublic" to the group object
(You can get who is owner or admin upon 'receivedgroupmsg' by console.log(group.users_data)
(You can get total number of users upon 'receivedgroupmsg' by console.log(group.total)
(You can get if the group is public or private upon 'receivedgroupmsg' by console.log(group.ispublic)
/* Part 1: */
Location: kik-node-api\src\kikClient.js = add:
const g_changeName = require("./requests/g_changeName");
const p_changeName = require("./requests/p_changeName");
Add anywhere in KikClient within KikClient class:
Profile Change Name:
/* Part 2: */
Location: kik-node-api\src\requests = create file:
p_changeName.js
g_changeName.js
Call function:
Kik.g_changeName(group.jid, "Group Name");
Kik.p_changeName("Firstname, "Lastname"
Any ideas why I get this? No errors or anything of the sort
Get Info from username:
{
"firstName":"Kik",
"lastName":"Team",
"displayPicLastModified":1531418402837,
"displayPic":"pic_url.jpg"
}
Code (KikClient.js):
Const axios = require('axios');
getInfoFromUsername(username){
const url = `https://ws2.kik.com/user/${username}`;
axios(url).then(response => {
const htmlToObj = response.data;
return htmlToObj;
}).catch();
return null;
}
(excuse me if my github etiquette is lacking, total newb here as you know)
but....
kikconnection.js
if(data.length >= 16384)
regarding this data size amount, im coming across two issues
1 (seems to be purely a server side issue)
but "hidden" groups are shown listed in this first packet i recieve, groups that don't show in my apps listings. UNLESS there are other users than myself listed in them (usually its just me) then i must add those users to a functioning group, then start a pm with them. only then will the group we share in common appear in the app, and then i can actually leave the group.
....... which besides just being over all interesting..... is causing me to just get a listing of glitched groups within the first received packet...... and then the roster/group listing of the API, just terminats because its hit the packet size limit.... causing me to be unable to proceed to the actual functioning groups that would be displayed by the next full packet
When sending a link it does not appear as an active clickable link, rather it appears as plain text.
Trying to create a function that checks if the user is already a friend, however I cannot seem to figure it out.
I thought getRoster(friends)
would return an array like the one within the "receivedroster"
event console.log(friends)
from within the recievedprivatemsg
event.
I have to admit I am very rusty with a limited knowledge of what I am actually doing - this is all a learning experience for me and hope you can help me understand my issue.
...
Might be a silly question, but how does one access friend requests?
Add a kik user as a friend feature is missing on readme or in API? No mention of this feature on anywhere
...
is there any function to mark the message been received and seen on private events
In the iqHandler.js file, you have down
groups.push({
jid: group.attrs.jid,
code: group.find("code")? group.find("code").text : null,
name: group.find("n").text,
users: users
})
And this is an issue because in group.find("code")? group.find("code").text : null
, it's gonna try to access .text
, and if group.find("code")
is undefined, it will throw an TypeError
error.
I propose making these changes here:
groups.push({
jid: group.attrs.jid,
code: group.find("code") && group.find("code").text || null,
name: group.find("n") && group.find("n").text || null,
users: users
})
As it will try to make sure it exists before it tries getting .text
, if it doesn't, it'll default to null
. I added it in name
also, as it seems to fix a connection hanging issue with the roster. This is tested working on the current build on this device, as well as another device a user had the same issue with.
...
(hello)
its minor but here's a contribution to help me feel productive.
if im not mistaken exampleBot.js is sending back a copy of what the remote user PMs to user .
(just delete since a console.log exists at the end?)
line 57
Kik.sendPrivateMessage(sender.jid, msg, (delivered, read) =>
Depreciated
Depreciated (function included in Kick/Add)
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module './src/kikClient'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Users\Liam\Desktop\Kik - StarBot\exampleBot.js:1:19)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
would anyone happen to know a fix for this?
Hi,
Just wondering if you're going to update this to make sending group images possible?
Happy to help out in anyway I can
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.