-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(typeorm): simplify DB API (#2646)
- Loading branch information
Showing
145 changed files
with
1,593 additions
and
1,991 deletions.
There are no files selected for viewing
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
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
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
14 changes: 6 additions & 8 deletions
14
src/commands/Management/AutoModeration/automod-attachments.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 |
---|---|---|
@@ -1,21 +1,19 @@ | ||
import { GuildSettings } from '#lib/database'; | ||
import { LanguageKeys } from '#lib/i18n/languageKeys'; | ||
import { AutoModerationCommand } from '#lib/moderation'; | ||
import { ApplyOptions } from '@sapphire/decorators'; | ||
|
||
const Root = LanguageKeys.Commands.AutoModeration; | ||
const SettingsRoot = GuildSettings.AutoModeration.Attachments; | ||
|
||
@ApplyOptions<AutoModerationCommand.Options>({ | ||
aliases: ['attachment-mode', 'attachments-mode', 'manage-attachment', 'manage-attachments'], | ||
description: Root.AttachmentsDescription, | ||
localizedNameKey: Root.AttachmentsName, | ||
adderPropertyName: 'attachments', | ||
keyEnabled: SettingsRoot.Enabled, | ||
keyOnInfraction: SettingsRoot.SoftAction, | ||
keyPunishment: SettingsRoot.HardAction, | ||
keyPunishmentDuration: SettingsRoot.HardActionDuration, | ||
keyPunishmentThreshold: SettingsRoot.ThresholdMaximum, | ||
keyPunishmentThresholdPeriod: SettingsRoot.ThresholdDuration | ||
keyEnabled: 'selfmodAttachmentsEnabled', | ||
keyOnInfraction: 'selfmodAttachmentsSoftAction', | ||
keyPunishment: 'selfmodAttachmentsHardAction', | ||
keyPunishmentDuration: 'selfmodAttachmentsHardActionDuration', | ||
keyPunishmentThreshold: 'selfmodAttachmentsThresholdMaximum', | ||
keyPunishmentThresholdPeriod: 'selfmodAttachmentsThresholdDuration' | ||
}) | ||
export class UserAutoModerationCommand extends AutoModerationCommand {} |
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 |
---|---|---|
@@ -1,21 +1,19 @@ | ||
import { GuildSettings } from '#lib/database'; | ||
import { LanguageKeys } from '#lib/i18n/languageKeys'; | ||
import { AutoModerationCommand } from '#lib/moderation'; | ||
import { ApplyOptions } from '@sapphire/decorators'; | ||
|
||
const Root = LanguageKeys.Commands.AutoModeration; | ||
const SettingsRoot = GuildSettings.AutoModeration.Capitals; | ||
|
||
@ApplyOptions<AutoModerationCommand.Options>({ | ||
aliases: ['capitals-mode', 'manage-capitals'], | ||
description: Root.CapitalsDescription, | ||
localizedNameKey: Root.CapitalsName, | ||
adderPropertyName: 'capitals', | ||
keyEnabled: SettingsRoot.Enabled, | ||
keyOnInfraction: SettingsRoot.SoftAction, | ||
keyPunishment: SettingsRoot.HardAction, | ||
keyPunishmentDuration: SettingsRoot.HardActionDuration, | ||
keyPunishmentThreshold: SettingsRoot.ThresholdMaximum, | ||
keyPunishmentThresholdPeriod: SettingsRoot.ThresholdDuration | ||
keyEnabled: 'selfmodCapitalsEnabled', | ||
keyOnInfraction: 'selfmodCapitalsSoftAction', | ||
keyPunishment: 'selfmodCapitalsHardAction', | ||
keyPunishmentDuration: 'selfmodCapitalsHardActionDuration', | ||
keyPunishmentThreshold: 'selfmodCapitalsThresholdMaximum', | ||
keyPunishmentThresholdPeriod: 'selfmodCapitalsThresholdDuration' | ||
}) | ||
export class UserAutoModerationCommand extends AutoModerationCommand {} |
Oops, something went wrong.