Skip to content

Commit

Permalink
verify
Browse files Browse the repository at this point in the history
  • Loading branch information
0-don committed Feb 9, 2024
1 parent 3cb1c97 commit c5b750f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const UNVERIFIED =
STATUS_ROLES?.[3];

export const GENERAL_CHANNEL = process.env.GENERAL_CHANNEL.trim();
export const VERIFY_CHANNEL = process.env.VERIFY_CHANNEL.trim();
export const VERIFY_CHANNEL = process.env.VERIFY_CHANNEL?.split(",").map((s) => s.trim()) || []
export const BOT_CHANNEL = process.env.BOT_CHANNEL.trim();
export const VOICE_EVENT_CHANNEL = process.env.VOICE_EVENT_CHANNEL.trim();
export const JOIN_EVENT_CHANNEL = process.env.JOIN_EVENT_CHANNEL.trim();
Expand Down
6 changes: 1 addition & 5 deletions src/lib/messages/Messages.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { VERIFY_CHANNEL } from "../constants.js";

export class MessagesService {
static async addMessageDb(message: Message<boolean>) {
// check if disboard bump command was used

// get info
const content = message.content;
const memberId = message.member?.user.id;
Expand All @@ -28,10 +26,8 @@ export class MessagesService {
}

static async deleteMessageDb(message: Message<boolean> | PartialMessage) {
// get info
const messageId = message.id;

// if info doesnt exist
if (!messageId) return;

try {
Expand All @@ -45,7 +41,7 @@ export class MessagesService {
const channel = (await message.channel?.fetch()) as TextChannel;
// remove non command messages in verify channel
if (
channel.name === VERIFY_CHANNEL &&
VERIFY_CHANNEL.includes(channel.name) &&
message.type !== MessageType.ChatInputCommand
) {
message.delete();
Expand Down

0 comments on commit c5b750f

Please sign in to comment.