Send emojis too

master
Cristiano Pires 2 years ago
parent aaf71f581b
commit e008008ced

@ -51,7 +51,7 @@ exports.guildData = (io,bot)=>
var aux = await getSpecificGuildData(guild.id);
var roleRules = aux ? await getRoleRules(guild.id):null;
var guildTextChannels = aux ? aux.TextChannels:null;
var emojis = aux ? aux.emojis:null;
const dataObject =
{
id:guild.id,
@ -63,7 +63,8 @@ exports.guildData = (io,bot)=>
hasRem:aux.extra?true:false,
memberCount:aux.extra?aux.extra.memberCount:null,
roleRules,
guildTextChannels
guildTextChannels,
emojis
};
resolve(dataObject);
@ -85,9 +86,10 @@ exports.guildData = (io,bot)=>
return {guild};
});
var TextChannels = [];
var emojis = [];
if(extra)
{
for(channel of extra.channels.cache)
for(var channel of extra.channels.cache)
{
if(channel[1].type==0)
{
@ -98,9 +100,16 @@ exports.guildData = (io,bot)=>
});
}
}
for(var emoji of extra.emojis.cache)
{
emojis.push(
{
'id':emoji[0],
'name':emoji[1].name
});
}
}
return {guild, extra, TextChannels};
return {guild, extra, TextChannels, emojis};
}
async function getRoleRules(guildid)

Loading…
Cancel
Save