mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-12-02 10:50:02 +01:00
Compare commits
2 Commits
main
...
feat/clear
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c76a514a2c | ||
|
|
f77758c039 |
@@ -66,6 +66,7 @@ model User {
|
||||
TempBanEndMod TempBan[] @relation("endTbanMod")
|
||||
VCMuteUser VCMute[] @relation("vcMuteUser")
|
||||
VCMuteMod VCMute[] @relation("vcMuteMod")
|
||||
ClearCommandMod ClearCommand[]
|
||||
}
|
||||
|
||||
model Verify {
|
||||
@@ -312,3 +313,11 @@ model VCMute {
|
||||
endTime DateTime?
|
||||
reason String?
|
||||
}
|
||||
|
||||
model ClearCommand {
|
||||
id Int @id @default(autoincrement())
|
||||
mod User @relation(fields: [modId], references: [id])
|
||||
modId String
|
||||
messages Int
|
||||
time DateTime @default(now())
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import { PermissionFlagsBits } from 'discord.js';
|
||||
import type { Message } from 'discord.js';
|
||||
|
||||
export class ClearCommand extends Command {
|
||||
@@ -26,7 +27,8 @@ export class ClearCommand extends Command {
|
||||
...options,
|
||||
name: 'clear',
|
||||
description: 'Deletes 1-100 messages in bulk',
|
||||
preconditions: ['CoordinatorOnly'],
|
||||
preconditions: [['CoordinatorOnly', 'ModOnly']],
|
||||
requiredUserPermissions: [PermissionFlagsBits.ManageMessages]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user