See the Hype Squad house your are in and get information about it. !house
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let event = context.params.event;
let member = await lib.discord.users['@0.2.1'].retrieve({
user_id: event.author.id,
});
const badgeId = member.public_flags;
const badges = {
'128': {
id: `brilliance`,
icon: `https://cdn.discordapp.com/attachments/947850848736796692/985156571594121246/Brilliance.png`,
thumbnail: `https://cdn.discordapp.com/attachments/947850848736796692/985170325497077831/BrillianceHouse.png`,
emoji: `<:Brilliance:985156099260948511>`,
name: `House Brilliance`,
colour: 0xf47b67,
info: `Long ago, a great evil spirit ravaged the land and almost brought an end to the world as we know it. At the moment, as if it was destined to happen, a mystical beam of light broke free from a young sage’s totem and three heroes emerged. With the combined efforts of Renwil the Brave, Urdim the Brilliant and Arame the Balanced, these heroes ended the reign of the evil spirit, and they soon faded into legends, surviving the test of time.\n\nThe House of Brilliance thanks you for joining our efforts to protect the land and maintain the legacy of Urdim. Your execution of strategies is that of a master tactician and without your calculated approach to any conflicts that comes your way, we would be much closer to descending into chaos.\n\nWithout Brilliance, the houses would collapse from within.`,
},
'64': {
id: `bravery`,
icon: `https://cdn.discordapp.com/attachments/947850848736796692/985156585431138395/Bravery.png`,
thumbnail: `https://cdn.discordapp.com/attachments/947850848736796692/985170338335838208/BraveryHouse.png`,
emoji: `<:Bravery:985156148233642004>`,
name: `House Bravery`,
colour: 0x9c84ef,
info: `Long ago, a great evil spirit ravaged the land and almost brought an end to the world as we know it. At the moment, as if it was destined to happen, a mystical beam of light broke free from a young sage’s totem and three heroes emerged. With the combined efforts of Renwil the Brave, Urdim the Brilliant and Arame the Balanced, these heroes ended the reign of the evil spirit, and they soon faded into legends, surviving the test of time.\n\nThe House of Bravery thanks you for joining our efforts to preserve the sanctity of the land and maintain the legacy of Renwil. Your bravery is comparable to that of a thousand gallant warriors and without your leadership and prowess, we would be much closer to descending into chaos.\n\nWithout Bravery, the houses would be overrun by the evil.`,
},
'256': {
id: `balance`,
icon: `https://cdn.discordapp.com/attachments/947850848736796692/985156596999000124/Balance.png`,
thumbnail: `https://cdn.discordapp.com/attachments/947850848736796692/985170351241723925/BalanceHouse.png`,
emoji: `<:Balance:985156160548110366>`,
name: `House Balance`,
colour: 0x45ddc0,
info: `Long ago, a great evil spirit awoke and wreaked havoc upon the land, bringing the world to the brink of destruction. Almost as it was destined to happen, a mystical beam of light sprung forth from a young sage’s totem. Out of the light emerged three heroes: Renwil the Brave, Urdim the Brilliant, and Arame the Balanced. These heroes banded together and fought the spirit, destroyed it, and saved the world. Now legends, the tales of Renwil, Urdim, and Arame have been told throughout the land for many, many years to come.\n\nThe House of Balance thanks you for joining our efforts to protect the land and maintain the legacy of Arame. Your ability to stay stout and steadfast in times of uncertainty is admirable. Without your natural understanding of both your environment and your inner self, we would be much closer to descending into chaos.\n\nWithout Balance, the houses would fall into chaos.`,
},
};
const badge = badges[badgeId];
if (!badge) {
return lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: ``,
tts: false,
embeds: [
{
type: 'rich',
title: `${event.author.username} you are not a member any of these house's`,
description: ``,
color: 0x2f3136,
image: {
url: `https://cdn.discordapp.com/attachments/947850848736796692/985178532177133588/Houses.png`,
height: 0,
width: 0,
},
},
],
});
} else {
await lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: ``,
tts: false,
embeds: [
{
type: 'rich',
title: ``,
description: ``,
color: parseInt(badge.colour),
fields: [
{
name: `House Information`,
value: `> ${badge.info}`,
inline: true,
},
],
thumbnail: {
url: badge.thumbnail,
height: 0,
width: 0,
},
author: {
name: `You are a member of ${badge.name}.`,
icon_url: badge.icon,
},
footer: {
text: ``,
},
},
],
});
}