1
1
1231231edsfdaf2020-05-25 07:38:03
In contact with
1231231edsfdaf, 2020-05-25 07:38:03

Is there a way to join clans by name?

cmd.hear(/^(?:clan login|clan login|clan login|clan join|clan join)\s(.*)$/i, async (message, bot) => {
let clanid = message.user. clanid;
if(groups[clanid]) return bot(`you are already in a clan!`);
if(!message.args[1]) return bot(`you didn't enter a clan name!`);
let idclan = message. args[1];

if(!groups[idclan]) return bot(`This clan does not exist! Please provide a valid clan name.`);
groups[idclan].peoples += 1;
message.user.clanid = Number(message. args[1]);
if(!groups[idclan].users[message.user]) {
groups[idclan].users[message.user.uid] = {
id: message.user.id,
uid: message.user .uid,
level: 1
}
}
return bot(`you are logged into clan "${groups[idclan].name}"!\nType "clan help" to see clan commands!`);


});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question