Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
feat: remove github linking + move easter eggs
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev committed Feb 17, 2024
1 parent 05dd13a commit 9ae5eb7
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 455 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 🌐 Global Chat
A Discord bot which connects many servers together using a text channel!

![Languages](https://skillicons.dev/icons?i=nodejs,ts,express,mongodb,sentry,github)
![Languages](https://skillicons.dev/icons?i=nodejs,ts,express,mongodb,sentry)

---

Expand Down
49 changes: 0 additions & 49 deletions src/buttons/github/unlink.ts

This file was deleted.

9 changes: 0 additions & 9 deletions src/commands/staff/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import getRoles from "../../functions/roles/get";

import BannedUser from "../../models/BannedUser";
import BlockedMessage from "../../models/BlockedMessage";
import GitHubUser from "../../models/GitHubUser";
import Message from "../../models/Message";

const command: Command = {
Expand Down Expand Up @@ -52,13 +51,6 @@ const command: Command = {
const roleArray: Role[] = getRoleArray(await getRoles(user.id, client));
const roles = roleArray.map(role => getRoleWithEmoji(role));

// Linked Accounts
const accounts = [];

const github = await GitHubUser.findOne({ _id: user.id });

if(github) accounts.push(`${emoji.github} GitHub\n${emoji.reply} <t:${github.linked.toString().slice(0, -3)}>`);

// Statistics
const blocked = (await BlockedMessage.find({ user: user.id })).length;
const images = (await Message.find({ user: user.id, attachment: { $ne: null } })).length;
Expand All @@ -81,7 +73,6 @@ const command: Command = {
if(banned) userInfo.addFields({ name: "🔨 Ban Info", value: banData, inline: true });
if(roles.length) userInfo.addFields({ name: "🎭 Roles", value: roles.join("\n"), inline: true });
if(blocked || images || messages) userInfo.addFields({ name: "📊 Statistics", value: `${stats.messages}\n${stats.images}\n${stats.blocked}`, inline: true });
if(accounts.length) userInfo.addFields({ name: "🔗 Linked Accounts", value: accounts.join("\n"), inline: true });

await interaction.editReply({ embeds: [userInfo] });
} catch(err) {
Expand Down
185 changes: 0 additions & 185 deletions src/commands/user/github.ts

This file was deleted.

12 changes: 1 addition & 11 deletions src/commands/user/me.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ import Command from "../../classes/Command";
import ExtendedClient from "../../classes/ExtendedClient";
import { CommandInteraction } from "discord.js";

import { emojis as emoji } from "../../config";
import { getRoleArray, Role, getRoleWithEmoji } from "../../classes/Roles";
import getRoles from "../../functions/roles/get";

import BlockedMessage from "../../models/BlockedMessage";
import GitHubUser from "../../models/GitHubUser";
import Message from "../../models/Message";

const command: Command = {
Expand All @@ -29,13 +27,6 @@ const command: Command = {
const roleArray: Role[] = getRoleArray(await getRoles(interaction.user.id, client));
const roles = roleArray.map(role => getRoleWithEmoji(role));

// Linked Accounts
const accounts = [];

const github = await GitHubUser.findOne({ _id: interaction.user.id });

if(github) accounts.push(`${emoji.github} GitHub\n${emoji.reply} <t:${github.linked.toString().slice(0, -3)}>`);

// Statistics
const blocked = (await BlockedMessage.find({ user: interaction.user.id })).length;
const images = (await Message.find({ user: interaction.user.id, attachment: { $ne: null } })).length;
Expand All @@ -51,14 +42,13 @@ const command: Command = {
.setColor(client.config_embeds.default)
.setDescription("*There is no information available about you.*")

if(accounts.length || roles.length || blocked || images || messages) {
if(roles.length || blocked || images || messages) {
userInfo.setTitle("User Information");
userInfo.setDescription(null);
}

if(roles.length) userInfo.addFields({ name: "🎭 Roles", value: roles.join("\n"), inline: true });
if(blocked || images || messages) userInfo.addFields({ name: "📊 Statistics", value: `${stats.messages}\n${stats.images}\n${stats.blocked}`, inline: true });
if(accounts.length) userInfo.addFields({ name: "🔗 Linked Accounts", value: accounts.join("\n"), inline: true });

await interaction.editReply({ embeds: [userInfo] });
} catch(err) {
Expand Down
Loading

0 comments on commit 9ae5eb7

Please sign in to comment.