Removed snipe command

This commit is contained in:
2024-02-24 12:23:39 +01:00
parent 160c3b5348
commit dc126b6371
3 changed files with 0 additions and 120 deletions

View File

@@ -1,35 +0,0 @@
import { ChannelType, Message } from "discord.js"
import { IEvent } from "interfaces"
import snipeCacheSchema from "schemas/snipeCacheSchema"
import mongoose from "mongoose"
import { SnipeCache } from "typings"
export = {
name: "snipecache",
description: "Logs messages for the snipe command",
event: "messageDelete",
disabled: true,
async execute(message: Message) {
if (message.channel.type !== ChannelType.GuildText) return
if (message.author.bot) return
const msg: SnipeCache = {
author: message.author.id,
content: message.content,
channel: message.channel.id,
createdAt: message.createdTimestamp,
deletedAt: Date.now(),
attachments: message.attachments.map(a => a.url) || []
}
const snipeCache = new snipeCacheSchema({
_id: new mongoose.Types.ObjectId(),
userid: message.author.id,
channelid: message.channel.id,
data: msg
})
await snipeCache.save()
}
} as IEvent