Amino.JS
Amino.JS copied to clipboard
Community Global Config System
Community System.
community.join('id'); and community.leave();
So that users dont need to give the Com. Variable at every little Step that they are doing.
What if the users want to perform a community leave operation but with another community?
How about we let the user assign a community ID as the first function param, and if the ID is given then overwrite the default community ID.
And as of the default community ID, the ID will come from the community. join.
And if both default ID and user-specified ID(function params) return null or undefined, we just simply throw an exception?
Felix you got me wrong here. I didnt thought of actually joining and
leaving communites. It's like in Amino that you can only use one community
at a time. Like community.use('xtesting') and then every other function
is then called in xtesting (so make the community variable Irrelevant.). I
didnt think about really joining or leaving communites, but it could be a
function soonTM.
On Sat, 5 Jan 2019, 08:20 Felix Fong <[email protected] wrote:
What if the users want to perform a community leave operation but with another community?
How about we let the user assign a community ID as the first function param, and if the ID is given then overwrite the default community ID.
And as of the default community ID, the ID will come from the community. join.
And if both default ID and user-specified ID(function params) return null or undefined, we just simply throw an exception?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AminoJS/Amino.JS/issues/51#issuecomment-451634423, or mute the thread https://github.com/notifications/unsubscribe-auth/AqOM8tsr2pheSCwEN8HbqaPlxrP0nB3gks5vAFI_gaJpZM4Zpgg- .
That's actually a quite good idea pal 👍
It would be cool. It's not really hard to implement it, since it already have a Global SID config.
One question
The community.join('id'); set all the modules to work in the given community(if the person isn't on the community, does the person joins it?), but what does community.leave(); should do? Quit the community?
let us just say a person want's to check into every community, list all chats, send a message and then exit the process.
the way he would do that would be like this:
const amino = require('amino.js');
//login logic
let coms = amino.getComs();
coms.forEach(com => {
let chats = amino.getJoinedChats(communityID);
chats.forEach(chat => {
amino.sendChat(communityID, [other params]);
})})
process.exit(0);
The way i find it more successful for everyone is the community system:
An Example again:
const amino = require('amino.js');
//login logic
let coms = amino.getComs();
coms.forEach(com => {
community.join(com.id);
let chats = amino.getJoinedChats();
chats.forEach(chat => {
amino.sendChat([other params]);
})
community.leave();
})
process.exit(0);
The Logic behind actually Joining or Leaving Communities would be a totally different one.
Aaaaah got it! Understood the logic
I’ll be working on it when I get time!
�
From: Robin Möller [mailto:[email protected]] Sent: Sunday, March 24, 2019 5:06 AM To: AminoJS/Amino.JS Cc: Akatsuki Levi; Assign Subject: Re: [AminoJS/Amino.JS] Community Global Config System (#51)
�
let us just say a person want's to check into every community, list all chats, send a message and then exit the process.
the way he would do that would be like this:
amino = require('amino.js');