-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: streamline moderation settings commands
- Loading branch information
Showing
20 changed files
with
395 additions
and
135 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/commands/Management/Message Filters/attachment-mode.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { GuildSettings, type AdderKey, type GuildSettingsOfType } from '#lib/database'; | ||
import { LanguageKeys } from '#lib/i18n/languageKeys'; | ||
import { SelfModerationCommand } from '#lib/moderation'; | ||
import { ApplyOptions } from '@sapphire/decorators'; | ||
|
||
const Root = LanguageKeys.Commands.Management; | ||
const SettingsRoot = GuildSettings.Selfmod.Attachments; | ||
|
||
@ApplyOptions<SelfModerationCommand.Options>({ | ||
aliases: ['attachments-mode', 'manage-attachment', 'manage-attachments'], | ||
description: Root.AttachmentsModeDescription, | ||
detailedDescription: Root.AttachmentsModeExtended | ||
}) | ||
export class UserSelfModerationCommand extends SelfModerationCommand { | ||
protected $adder: AdderKey = 'attachments'; | ||
protected keyEnabled: GuildSettingsOfType<boolean> = SettingsRoot.Enabled; | ||
protected keySoftAction: GuildSettingsOfType<number> = SettingsRoot.SoftAction; | ||
protected keyHardAction: GuildSettingsOfType<number | null> = SettingsRoot.HardAction; | ||
protected keyHardActionDuration: GuildSettingsOfType<number | null> = SettingsRoot.HardActionDuration; | ||
protected keyThresholdMaximum: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdMaximum; | ||
protected keyThresholdDuration: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdDuration; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { GuildSettings, type AdderKey, type GuildSettingsOfType } from '#lib/database'; | ||
import { LanguageKeys } from '#lib/i18n/languageKeys'; | ||
import { SelfModerationCommand } from '#lib/moderation'; | ||
import { ApplyOptions } from '@sapphire/decorators'; | ||
|
||
const Root = LanguageKeys.Commands.Management; | ||
const SettingsRoot = GuildSettings.Selfmod.Capitals; | ||
|
||
@ApplyOptions<SelfModerationCommand.Options>({ | ||
aliases: ['manage-capitals'], | ||
description: Root.CapitalsModeDescription, | ||
detailedDescription: Root.CapitalsModeExtended | ||
}) | ||
export class UserSelfModerationCommand extends SelfModerationCommand { | ||
protected $adder: AdderKey = 'capitals'; | ||
protected keyEnabled: GuildSettingsOfType<boolean> = SettingsRoot.Enabled; | ||
protected keySoftAction: GuildSettingsOfType<number> = SettingsRoot.SoftAction; | ||
protected keyHardAction: GuildSettingsOfType<number | null> = SettingsRoot.HardAction; | ||
protected keyHardActionDuration: GuildSettingsOfType<number | null> = SettingsRoot.HardActionDuration; | ||
protected keyThresholdMaximum: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdMaximum; | ||
protected keyThresholdDuration: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdDuration; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { GuildSettings, type AdderKey, type GuildSettingsOfType } from '#lib/database'; | ||
import { LanguageKeys } from '#lib/i18n/languageKeys'; | ||
import { SelfModerationCommand } from '#lib/moderation'; | ||
import { ApplyOptions } from '@sapphire/decorators'; | ||
|
||
const Root = LanguageKeys.Commands.Management; | ||
const SettingsRoot = GuildSettings.Selfmod.Filter; | ||
|
||
@ApplyOptions<SelfModerationCommand.Options>({ | ||
aliases: ['word-filter-mode', 'manage-filter'], | ||
description: Root.FilterModeDescription, | ||
detailedDescription: Root.FilterModeExtended | ||
}) | ||
export class UserSelfModerationCommand extends SelfModerationCommand { | ||
protected $adder: AdderKey = 'words'; | ||
protected keyEnabled: GuildSettingsOfType<boolean> = SettingsRoot.Enabled; | ||
protected keySoftAction: GuildSettingsOfType<number> = SettingsRoot.SoftAction; | ||
protected keyHardAction: GuildSettingsOfType<number | null> = SettingsRoot.HardAction; | ||
protected keyHardActionDuration: GuildSettingsOfType<number | null> = SettingsRoot.HardActionDuration; | ||
protected keyThresholdMaximum: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdMaximum; | ||
protected keyThresholdDuration: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdDuration; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { GuildSettings, type AdderKey, type GuildSettingsOfType } from '#lib/database'; | ||
import { LanguageKeys } from '#lib/i18n/languageKeys'; | ||
import { SelfModerationCommand } from '#lib/moderation'; | ||
import { ApplyOptions } from '@sapphire/decorators'; | ||
|
||
const Root = LanguageKeys.Commands.Management; | ||
const SettingsRoot = GuildSettings.Selfmod.Invites; | ||
|
||
@ApplyOptions<SelfModerationCommand.Options>({ | ||
aliases: ['invites-mode', 'manage-invite', 'manage-invites'], | ||
description: Root.InviteModeDescription, | ||
detailedDescription: Root.InviteModeExtended | ||
}) | ||
export class UserSelfModerationCommand extends SelfModerationCommand { | ||
protected $adder: AdderKey = 'invites'; | ||
protected keyEnabled: GuildSettingsOfType<boolean> = SettingsRoot.Enabled; | ||
protected keySoftAction: GuildSettingsOfType<number> = SettingsRoot.SoftAction; | ||
protected keyHardAction: GuildSettingsOfType<number | null> = SettingsRoot.HardAction; | ||
protected keyHardActionDuration: GuildSettingsOfType<number | null> = SettingsRoot.HardActionDuration; | ||
protected keyThresholdMaximum: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdMaximum; | ||
protected keyThresholdDuration: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdDuration; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { GuildSettings, type AdderKey, type GuildSettingsOfType } from '#lib/database'; | ||
import { LanguageKeys } from '#lib/i18n/languageKeys'; | ||
import { SelfModerationCommand } from '#lib/moderation'; | ||
import { ApplyOptions } from '@sapphire/decorators'; | ||
|
||
const Root = LanguageKeys.Commands.Management; | ||
const SettingsRoot = GuildSettings.Selfmod.Links; | ||
|
||
@ApplyOptions<SelfModerationCommand.Options>({ | ||
aliases: ['links-mode', 'manage-link', 'manage-links'], | ||
description: Root.LinkModeDescription, | ||
detailedDescription: Root.LinkModeExtended | ||
}) | ||
export class UserSelfModerationCommand extends SelfModerationCommand { | ||
protected $adder: AdderKey = 'links'; | ||
protected keyEnabled: GuildSettingsOfType<boolean> = SettingsRoot.Enabled; | ||
protected keySoftAction: GuildSettingsOfType<number> = SettingsRoot.SoftAction; | ||
protected keyHardAction: GuildSettingsOfType<number | null> = SettingsRoot.HardAction; | ||
protected keyHardActionDuration: GuildSettingsOfType<number | null> = SettingsRoot.HardActionDuration; | ||
protected keyThresholdMaximum: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdMaximum; | ||
protected keyThresholdDuration: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdDuration; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { GuildSettings, type AdderKey, type GuildSettingsOfType } from '#lib/database'; | ||
import { LanguageKeys } from '#lib/i18n/languageKeys'; | ||
import { SelfModerationCommand } from '#lib/moderation'; | ||
import { ApplyOptions } from '@sapphire/decorators'; | ||
|
||
const Root = LanguageKeys.Commands.Management; | ||
const SettingsRoot = GuildSettings.Selfmod.Messages; | ||
|
||
@ApplyOptions<SelfModerationCommand.Options>({ | ||
aliases: ['messages-mode', 'manage-message', 'manage-messages'], | ||
description: Root.MessageModeDescription, | ||
detailedDescription: Root.MessageModeExtended | ||
}) | ||
export class UserSelfModerationCommand extends SelfModerationCommand { | ||
protected $adder: AdderKey = 'messages'; | ||
protected keyEnabled: GuildSettingsOfType<boolean> = SettingsRoot.Enabled; | ||
protected keySoftAction: GuildSettingsOfType<number> = SettingsRoot.SoftAction; | ||
protected keyHardAction: GuildSettingsOfType<number | null> = SettingsRoot.HardAction; | ||
protected keyHardActionDuration: GuildSettingsOfType<number | null> = SettingsRoot.HardActionDuration; | ||
protected keyThresholdMaximum: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdMaximum; | ||
protected keyThresholdDuration: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdDuration; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { GuildSettings, type AdderKey, type GuildSettingsOfType } from '#lib/database'; | ||
import { LanguageKeys } from '#lib/i18n/languageKeys'; | ||
import { SelfModerationCommand } from '#lib/moderation'; | ||
import { ApplyOptions } from '@sapphire/decorators'; | ||
|
||
const Root = LanguageKeys.Commands.Management; | ||
const SettingsRoot = GuildSettings.Selfmod.NewLines; | ||
|
||
@ApplyOptions<SelfModerationCommand.Options>({ | ||
aliases: ['newlines-mode', 'manage-newline', 'manage-newlines'], | ||
description: Root.NewlineModeDescription, | ||
detailedDescription: Root.NewlineModeExtended | ||
}) | ||
export class UserSelfModerationCommand extends SelfModerationCommand { | ||
protected $adder: AdderKey = 'newlines'; | ||
protected keyEnabled: GuildSettingsOfType<boolean> = SettingsRoot.Enabled; | ||
protected keySoftAction: GuildSettingsOfType<number> = SettingsRoot.SoftAction; | ||
protected keyHardAction: GuildSettingsOfType<number | null> = SettingsRoot.HardAction; | ||
protected keyHardActionDuration: GuildSettingsOfType<number | null> = SettingsRoot.HardActionDuration; | ||
protected keyThresholdMaximum: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdMaximum; | ||
protected keyThresholdDuration: GuildSettingsOfType<number | null> = SettingsRoot.ThresholdDuration; | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.