Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
lattice profile embed + upgrading discordjs to 13
Browse files Browse the repository at this point in the history
  • Loading branch information
sahupr committed Feb 17, 2022
1 parent 63bc250 commit 5e5934b
Show file tree
Hide file tree
Showing 5 changed files with 460 additions and 383 deletions.
4 changes: 2 additions & 2 deletions discord/client.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const Discord = require('discord.js')
const { Discord, Client, Intents } = require('discord.js')

const DISCORD_TOKEN = process.env.DISCORD_TOKEN

const client = new Discord.Client()
const client = new Client({intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]})

client.login(DISCORD_TOKEN)

Expand Down
2 changes: 1 addition & 1 deletion discord/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const client = require("./client");
const help = require("./help");
const multiply = require("./multiply");
const react = require("./react");
const countdown = require("./countdown");
// const countdown = require("./countdown");
const checkin = require("./checkin");
const { score, top } = require("./score");
const revvit = require("./revvit");
Expand Down
4 changes: 2 additions & 2 deletions discord/lattice.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const Discord = require("discord.js");
const Axios = require("axios").default;
const { User } = require("../database");
const { MessageEmbed } = require('discord.js');

const API_TOKEN = process.env.API_TOKEN;

Expand Down Expand Up @@ -41,7 +42,7 @@ async function latticeCommand(receivedMessage) {
} else {
// Else, send an embed with the Hacker's profile info
const discordFullUsername = `${discordUsername}#${receivedMessage.author.discriminator}`;
const infoEmbed = new Discord.MessageEmbed()
const infoEmbed = new MessageEmbed()
.setColor("#008C8C") // Mars Green color
.setAuthor({ name: "RevUC Hacker Profile", iconURL: "https://assets.revolutionuc.com/logo-128.png" })
.setTitle(`${name} @${discordFullUsername}`)
Expand All @@ -50,7 +51,6 @@ async function latticeCommand(receivedMessage) {
{ name: "Skills", value: skills.join(", ") },
{ name: "Looking for", value: lookingFor.join(", ") }
)

receivedMessage.channel.send({ embeds: [infoEmbed] })
}

Expand Down
Loading

0 comments on commit 5e5934b

Please sign in to comment.