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