From 0cd3a201a233ae0d2683fbd86b742bfb9bfc24e8 Mon Sep 17 00:00:00 2001 From: TrisTOON <36267812+TrisTOON@users.noreply.github.com> Date: Sun, 14 Apr 2024 00:53:28 +0200 Subject: [PATCH] Renames the `hyperlink` rule to`link` --- readme.md | 12 ++--- src/compilations.ts | 12 ++--- src/compilations/hyperlink.ts | 17 ------- src/compilations/link.ts | 17 +++++++ src/definitions.ts | 22 ++++---- src/definitions/{hyperlink.json => link.json} | 2 +- src/dependencies.d.ts | 8 +-- .../{hyperlink.d.ts => link.d.ts} | 4 +- src/emojis/hyperlink.png | Bin 9018 -> 0 bytes src/emojis/hyperlink.svg | 1 - src/emojis/link.png | Bin 0 -> 7219 bytes src/emojis/link.svg | 1 + src/rules.ts | 6 +-- src/rules/{hyperlink.ts => link.ts} | 47 ++++++++---------- 14 files changed, 72 insertions(+), 77 deletions(-) delete mode 100644 src/compilations/hyperlink.ts create mode 100644 src/compilations/link.ts rename src/definitions/{hyperlink.json => link.json} (96%) rename src/dependencies/{hyperlink.d.ts => link.d.ts} (72%) delete mode 100644 src/emojis/hyperlink.png delete mode 100644 src/emojis/hyperlink.svg create mode 100644 src/emojis/link.png create mode 100644 src/emojis/link.svg rename src/rules/{hyperlink.ts => link.ts} (62%) diff --git a/readme.md b/readme.md index 4c7a431..a9f52d9 100644 --- a/readme.md +++ b/readme.md @@ -20,11 +20,11 @@ $ export SHICKA_RECORD_DEFAULT_CHANNEL= $ export SHICKA_REFUSAL_DEFAULT_CHANNEL= $ export SHICKA_VERIFICATION_DEFAULT_CHANNEL= $ export SHICKA_VERIFICATION_VERIFIED_ROLE= -$ export SHICKA_HYPERLINK_DEFAULT_ALERT_ACTION_CHANNEL= -$ export SHICKA_HYPERLINK_DEFAULT_EXEMPT_CHANNELS= -$ export SHICKA_HYPERLINK_DEFAULT_EXEMPT_ROLES= -$ export SHICKA_HYPERLINK_REACTION_EMOJI= -$ export SHICKA_HYPERLINK_OVERRIDE_RULES_CHANNEL= +$ export SHICKA_LINK_DEFAULT_ALERT_ACTION_CHANNEL= +$ export SHICKA_LINK_DEFAULT_EXEMPT_CHANNELS= +$ export SHICKA_LINK_DEFAULT_EXEMPT_ROLES= +$ export SHICKA_LINK_REACTION_EMOJI= +$ export SHICKA_LINK_OVERRIDE_RULES_CHANNEL= $ export SHICKA_RULE7_DEFAULT_ALERT_ACTION_CHANNEL= $ export SHICKA_RULE7_DEFAULT_EXEMPT_CHANNELS= $ export SHICKA_RULE7_DEFAULT_EXEMPT_ROLES= @@ -132,6 +132,6 @@ $ npm start ### Rules -- `hyperlink` flags messages which contain a hyperlink as such in the given channel (set to `$SHICKA_HYPERLINK_DEFAULT_ALERT_ACTION_CHANNEL` by default) except when posted in any of the given exempted channels (set to `$SHICKA_HYPERLINK_DEFAULT_EXEMPT_CHANNELS` by default), when posted by non-administrator members having any of the given exempted roles (set to `$SHICKA_HYPERLINK_DEFAULT_EXEMPT_ROLES` by default) or when posted by administrator members +- `link` flags messages which contain a hyperlink as such in the given channel (set to `$SHICKA_LINK_DEFAULT_ALERT_ACTION_CHANNEL` by default) except when posted in any of the given exempted channels (set to `$SHICKA_LINK_DEFAULT_EXEMPT_CHANNELS` by default), when posted by non-administrator members having any of the given exempted roles (set to `$SHICKA_LINK_DEFAULT_EXEMPT_ROLES` by default) or when posted by administrator members - `rule7` flags messages which violate the rule 7 as such in the given channel (set to `$SHICKA_RULE7_DEFAULT_ALERT_ACTION_CHANNEL` by default) except when posted in any of the given exempted channels (set to `$SHICKA_RULE7_DEFAULT_EXEMPT_CHANNELS` by default), when posted by non-administrator members having any of the given exempted roles (set to `$SHICKA_RULE7_DEFAULT_EXEMPT_ROLES` by default) or when posted by administrator members diff --git a/src/compilations.ts b/src/compilations.ts index 10baf2c..f0d1ff5 100644 --- a/src/compilations.ts +++ b/src/compilations.ts @@ -11,8 +11,8 @@ import departureCompilation from "./compilations/departure.js"; import emojiCompilation from "./compilations/emoji.js"; import gateCompilation from "./compilations/gate.js"; import helpCompilation from "./compilations/help.js"; -import hyperlinkCompilation from "./compilations/hyperlink.js"; import leaderboardCompilation from "./compilations/leaderboard.js"; +import linkCompilation from "./compilations/link.js"; import missionCompilation from "./compilations/mission.js"; import outfitCompilation from "./compilations/outfit.js"; import patchCompilation from "./compilations/patch.js"; @@ -44,8 +44,8 @@ type Departure = typeof departureCompilation; type Emoji = typeof emojiCompilation; type Gate = typeof gateCompilation; type Help = typeof helpCompilation; -type Hyperlink = typeof hyperlinkCompilation; type Leaderboard = typeof leaderboardCompilation; +type Link = typeof linkCompilation; type Mission = typeof missionCompilation; type Outfit = typeof outfitCompilation; type Patch = typeof patchCompilation; @@ -64,7 +64,7 @@ type Trailer = typeof trailerCompilation; type Update = typeof updateCompilation; type Verification = typeof verificationCompilation; type Verify = typeof verifyCompilation; -type Compilation = About | Application | Apply | Approval | Approve | Arrival | Bear | Chat | Count | Departure | Emoji | Gate | Help | Hyperlink | Leaderboard | Mission | Outfit | Patch | Patching | Posting | Raw | Record | Refusal | Refuse | Roadmap | Rule7 | Soundtrack | Store | Tracker | Trailer | Update | Verification | Verify; +type Compilation = About | Application | Apply | Approval | Approve | Arrival | Bear | Chat | Count | Departure | Emoji | Gate | Help | Leaderboard | Link | Mission | Outfit | Patch | Patching | Posting | Raw | Record | Refusal | Refuse | Roadmap | Rule7 | Soundtrack | Store | Tracker | Trailer | Update | Verification | Verify; const about: About = aboutCompilation; const application: Application = applicationCompilation; const apply: Apply = applyCompilation; @@ -78,8 +78,8 @@ const departure: Departure = departureCompilation; const emoji: Emoji = emojiCompilation; const gate: Gate = gateCompilation; const help: Help = helpCompilation; -const hyperlink: Hyperlink = hyperlinkCompilation; const leaderboard: Leaderboard = leaderboardCompilation; +const link: Link = linkCompilation; const mission: Mission = missionCompilation; const outfit: Outfit = outfitCompilation; const patch: Patch = patchCompilation; @@ -113,8 +113,8 @@ export type { Emoji, Gate, Help, - Hyperlink, Leaderboard, + Link, Mission, Outfit, Patch, @@ -148,8 +148,8 @@ export { emoji, gate, help, - hyperlink, leaderboard, + link, mission, outfit, patch, diff --git a/src/compilations/hyperlink.ts b/src/compilations/hyperlink.ts deleted file mode 100644 index 3f62180..0000000 --- a/src/compilations/hyperlink.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type {Hyperlink} from "../dependencies.js"; -import type {Localized} from "../utils/string.js"; -import {hyperlink} from "../definitions.js"; -import {compileAll} from "../utils/string.js"; -type HelpWithChannelsLocalizations = Localized<(groups: Hyperlink["helpWithChannels"]) => string>; -type HelpWithoutChannelsLocalizations = Localized<(groups: Hyperlink["helpWithoutChannels"]) => string>; -type HyperlinkCompilation = { - helpWithChannels: HelpWithChannelsLocalizations, - helpWithoutChannels: HelpWithoutChannelsLocalizations, -}; -const helpWithChannelsLocalizations: HelpWithChannelsLocalizations = compileAll(hyperlink["helpWithChannels"]); -const helpWithoutChannelsLocalizations: HelpWithoutChannelsLocalizations = compileAll(hyperlink["helpWithoutChannels"]); -const hyperlinkCompilation: HyperlinkCompilation = { - helpWithChannels: helpWithChannelsLocalizations, - helpWithoutChannels: helpWithoutChannelsLocalizations, -}; -export default hyperlinkCompilation; diff --git a/src/compilations/link.ts b/src/compilations/link.ts new file mode 100644 index 0000000..9ab6d40 --- /dev/null +++ b/src/compilations/link.ts @@ -0,0 +1,17 @@ +import type {Link} from "../dependencies.js"; +import type {Localized} from "../utils/string.js"; +import {link} from "../definitions.js"; +import {compileAll} from "../utils/string.js"; +type HelpWithChannelsLocalizations = Localized<(groups: Link["helpWithChannels"]) => string>; +type HelpWithoutChannelsLocalizations = Localized<(groups: Link["helpWithoutChannels"]) => string>; +type LinkCompilation = { + helpWithChannels: HelpWithChannelsLocalizations, + helpWithoutChannels: HelpWithoutChannelsLocalizations, +}; +const helpWithChannelsLocalizations: HelpWithChannelsLocalizations = compileAll(link["helpWithChannels"]); +const helpWithoutChannelsLocalizations: HelpWithoutChannelsLocalizations = compileAll(link["helpWithoutChannels"]); +const linkCompilation: LinkCompilation = { + helpWithChannels: helpWithChannelsLocalizations, + helpWithoutChannels: helpWithoutChannelsLocalizations, +}; +export default linkCompilation; diff --git a/src/definitions.ts b/src/definitions.ts index 8783bfa..e6d8926 100644 --- a/src/definitions.ts +++ b/src/definitions.ts @@ -12,8 +12,8 @@ import departureDefinition from "./definitions/departure.json" assert {type: "js import emojiDefinition from "./definitions/emoji.json" assert {type: "json"}; import gateDefinition from "./definitions/gate.json" assert {type: "json"}; import helpDefinition from "./definitions/help.json" assert {type: "json"}; -import hyperlinkDefinition from "./definitions/hyperlink.json" assert {type: "json"}; import leaderboardDefinition from "./definitions/leaderboard.json" assert {type: "json"}; +import linkDefinition from "./definitions/link.json" assert {type: "json"}; import missionDefinition from "./definitions/mission.json" assert {type: "json"}; import outfitDefinition from "./definitions/outfit.json" assert {type: "json"}; import patchDefinition from "./definitions/patch.json" assert {type: "json"}; @@ -166,12 +166,6 @@ type Help = { help: Localized, reply: Localized, }; -type Hyperlink = { - ruleName: string, - ruleReason: string, - helpWithChannels: Localized, - helpWithoutChannels: Localized, -}; type Leaderboard = { commandName: string, commandDescription: Localized, @@ -179,6 +173,12 @@ type Leaderboard = { reply: Localized, link: Localized, }; +type Link = { + ruleName: string, + ruleReason: string, + helpWithChannels: Localized, + helpWithoutChannels: Localized, +}; type Mission = { commandName: string, commandDescription: Localized, @@ -327,7 +327,7 @@ type Verify = { reply: Localized, noPermissionReply: Localized, }; -type Definition = About | Application | Apply | Approval | Approve | Arrival | Bear | Chat | Count | Departure | Emoji | Gate | Help | Hyperlink | Leaderboard | Mission | Outfit | Patch | Patching | Posting | Raw | Record | Refusal | Refuse | Roadmap | Rule7 | Soundtrack | Store | Tracker | Trailer | Update | Verification | Verify; +type Definition = About | Application | Apply | Approval | Approve | Arrival | Bear | Chat | Count | Departure | Emoji | Gate | Help | Leaderboard | Link | Mission | Outfit | Patch | Patching | Posting | Raw | Record | Refusal | Refuse | Roadmap | Rule7 | Soundtrack | Store | Tracker | Trailer | Update | Verification | Verify; const about: About = aboutDefinition; const application: Application = applicationDefinition; const apply: Apply = applyDefinition; @@ -341,8 +341,8 @@ const departure: Departure = departureDefinition; const emoji: Emoji = emojiDefinition; const gate: Gate = gateDefinition; const help: Help = helpDefinition; -const hyperlink: Hyperlink = hyperlinkDefinition; const leaderboard: Leaderboard = leaderboardDefinition; +const link: Link = linkDefinition; const mission: Mission = missionDefinition; const outfit: Outfit = outfitDefinition; const patch: Patch = patchDefinition; @@ -376,8 +376,8 @@ export type { Emoji, Gate, Help, - Hyperlink, Leaderboard, + Link, Mission, Outfit, Patch, @@ -411,8 +411,8 @@ export { emoji, gate, help, - hyperlink, leaderboard, + link, mission, outfit, patch, diff --git a/src/definitions/hyperlink.json b/src/definitions/link.json similarity index 96% rename from src/definitions/hyperlink.json rename to src/definitions/link.json index 7c4f96c..fe9e87c 100644 --- a/src/definitions/hyperlink.json +++ b/src/definitions/link.json @@ -1,5 +1,5 @@ { - "ruleName": "hyperlink", + "ruleName": "link", "ruleReason": "Flags messages which contain a hyperlink as such in the given channels", "helpWithChannels": { "en-US": "I flag messages which contain a hyperlink as such in $", diff --git a/src/dependencies.d.ts b/src/dependencies.d.ts index acde8eb..f8787b3 100644 --- a/src/dependencies.d.ts +++ b/src/dependencies.d.ts @@ -11,8 +11,8 @@ import type DepartureDependency from "./dependencies/departure.js"; import type EmojiDependency from "./dependencies/emoji.js"; import type GateDependency from "./dependencies/gate.js"; import type HelpDependency from "./dependencies/help.js"; -import type HyperlinkDependency from "./dependencies/hyperlink.js"; import type LeaderboardDependency from "./dependencies/leaderboard.js"; +import type LinkDependency from "./dependencies/link.js"; import type MissionDependency from "./dependencies/mission.js"; import type OutfitDependency from "./dependencies/outfit.js"; import type PatchDependency from "./dependencies/patch.js"; @@ -44,8 +44,8 @@ type Departure = DepartureDependency; type Emoji = EmojiDependency; type Gate = GateDependency; type Help = HelpDependency; -type Hyperlink = HyperlinkDependency; type Leaderboard = LeaderboardDependency; +type Link = LinkDependency; type Mission = MissionDependency; type Outfit = OutfitDependency; type Patch = PatchDependency; @@ -64,7 +64,7 @@ type Trailer = TrailerDependency; type Update = UpdateDependency; type Verification = VerificationDependency; type Verify = VerifyDependency; -type Dependency = About | Application | Apply | Approval | Approve | Arrival | Bear | Chat | Count | Departure | Emoji | Gate | Help | Hyperlink | Leaderboard | Mission | Outfit | Patch | Patching | Posting | Raw | Record | Refusal | Refuse | Roadmap | Rule7 | Soundtrack | Store | Tracker | Trailer | Update | Verification | Verify; +type Dependency = About | Application | Apply | Approval | Approve | Arrival | Bear | Chat | Count | Departure | Emoji | Gate | Help | Leaderboard | Link | Mission | Outfit | Patch | Patching | Posting | Raw | Record | Refusal | Refuse | Roadmap | Rule7 | Soundtrack | Store | Tracker | Trailer | Update | Verification | Verify; export type {Dependency as default}; export type { About, @@ -80,8 +80,8 @@ export type { Emoji, Gate, Help, - Hyperlink, Leaderboard, + Link, Mission, Outfit, Patch, diff --git a/src/dependencies/hyperlink.d.ts b/src/dependencies/link.d.ts similarity index 72% rename from src/dependencies/hyperlink.d.ts rename to src/dependencies/link.d.ts index 2233eba..a63a667 100644 --- a/src/dependencies/hyperlink.d.ts +++ b/src/dependencies/link.d.ts @@ -2,8 +2,8 @@ type HelpWithChannelsGroups = { channelMentions: () => string, }; type HelpWithoutChannelsGroups = {}; -type HyperlinkDependency = { +type LinkDependency = { helpWithChannels: HelpWithChannelsGroups, helpWithoutChannels: HelpWithoutChannelsGroups, }; -export type {HyperlinkDependency as default}; +export type {LinkDependency as default}; diff --git a/src/emojis/hyperlink.png b/src/emojis/hyperlink.png deleted file mode 100644 index 110f4e04ded8069aa4742a26531bf6d2ce9a5461..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9018 zcmdUV^;^`@x9*-{fEgNw7)n}7QUwHrp+mYwN=8IclnxOXT0%f66{M7Ir5i~>DJcm- zK)OMYJ|E8c-t*kQ;6BftU#9k6dwq7S^{)5b;d(l1FTS}Ns40TtUY2D5*nx(!f{~Zix}{GnU3<;>(G_+|F{(CrJx!aDfa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OfIf^A(%jjRMniX_=PYg^Yv@6T%5Z|~p(G>j(c=lLxLv6VBqfUd_qFO` znNTY6mtqoh4798S=YV6Lv180IeozRN)Aqns9q?yQ@74=?qiGD2FuOc;pcDco75v#P z4}PcvrjKd z{Dx|ZoU1s0xp&@;ax5+=@cCR(;f^l;uA6T#zs3&h`knZW7FReU6>ZE%t4h$U-Z6F~ zI97z9c^M`1mjkyZ5*)h@O1~eRdOA+*BRTxO_@&n%p@EcvF0cOCr3=W|Ix#*TN=FiM z6@yEm`ZpdFkmXBq3erXVo0>7J8pz-8V`Uilx7#Izf@2r<*UQ5IUZm{Lokxeye9p*I z{o~I6ZxNqZu4y&i*V{T4%$F%?D6{WEL*0`L!2nM780Z>=tOs8>^4=vFH~w1=6#*78 z4~hM;ofJIO0pFlY5V41}w%`R`7P|JZGnT>48S4#+`r>JdWPmzW4HAqm$;2xo#34J_ z1;ZCGcK8ltybBlh`UQ63;?lr#5;35Rg^UC5H9Z>Yt_wSFbvcOe$S%k@dkm{4C;TmB mhkcj74N$=@jQ@Y&r4U diff --git a/src/emojis/link.png b/src/emojis/link.png new file mode 100644 index 0000000000000000000000000000000000000000..32cd023c75f15cedd85bb6094dc0429f3e05bbe1 GIT binary patch literal 7219 zcmd6M_g53qx9=nb2nZND3P|V%qz0u!=ny(0NXG(Fl%ljy15%}k3euz#dR0)0Arut_ zqzfn@2-2%kLg$X(d)IyI{R3~k{4$v}bN1P1pFR70KA#_yJ}hh9Hn|Kmh_bPX}Om9ba^okN^b31BBBu;{kKI12{Jf2`o_{O>RLEcv@ke z{Ko(c2mxRs1_0FL*Kd9w1RlsckH6vq9Fi^(E~>sebQQO})V| z#;-yJR+=&|Vi^PrE@;YRXS75iUc{AFu!cU)ppHUNXx692{uC&f(%hk9BpPY9L?UV; zZ|y&{v>fXTIoczRPfS$w%-oZQ!0}Ercb&V)A!FXJnB!bj&^*GC`$)!RNbce$tMlm# z#4L_4P@Jywo^t=WNW`riqr9psQg z3*uRS??g*;bB==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c6h;p?xm;CyEvC4@B=96e*ak*t1T)4RGohu_bJ6uy3W9O}AZ$-Wv#nL(2$7=w}{})X;kFhq|-6+^Hmfc_Q@G$W;UQgdA6} zS`wdB9d{*57l&drb0voLR9v4$0R|W|RMcbb;T6}9-%(#7IaWweYs&wj@Gw|;gZp#A zk(1jaS+s*~bYaVzA{ZnVW9gtW1ZsYY=v?l6xhE_JnCbCh7a8$4Cqqd}Ab+`SVu4+5 zfqS+OW9VEC*rp6M(~1A543c^hmQhyg^?aq?^|+>s<3xVI{L zT9^>5u$W@rEDy(oFQ1Q?u?>Oi-ALnD6>QP0{|Fusv<4c4tY}ao4^>W-`(KH?qG>Xq z8RFsetHYl6L*dtt*Z*53Pyf^d^;XJ4-~--2L~+B~L6PWl?>!k$v;rzk8|_wvo7_XI z$434Cc}wTRE)o+jIMc^e579P|diLd-ta^wI1yB6jqKF{vvVYxaYJ zROKQr9KqN7{k+T=1eCa`w+zb5N&Np;bEA?{twuTh+m8~j%Zy(KrrFb*Y~cCE>X+<` zir6RUXnCnJCtS%)&+Knkyc=EF-3w%}@Bcz#ivHDOXJ@BKUY{WI{hT)J4t?kVdi6bD z2!7KTfI5cIG6HY`VF04r$8c4xEf8$_tX_`=Fi5Zkf_dmyN&_7Q+ebHZ)nNei3)mTY z{zk(PQJVw6+74Ox0EDg)*t>Ye?G}OG1^YmwB?t%}^AL>F?==%RE5bOd1 NdRj)B)#{EB{{?me4aNWf literal 0 HcmV?d00001 diff --git a/src/emojis/link.svg b/src/emojis/link.svg new file mode 100644 index 0000000..11a8969 --- /dev/null +++ b/src/emojis/link.svg @@ -0,0 +1 @@ + diff --git a/src/rules.ts b/src/rules.ts index 846a708..0b2a3d4 100644 --- a/src/rules.ts +++ b/src/rules.ts @@ -6,7 +6,7 @@ import type { AutoModerationRuleCreateOptions, } from "discord.js"; import type {Localized} from "./utils/string.js"; -import hyperlinkRule from "./rules/hyperlink.js"; +import linkRule from "./rules/link.js"; import rule7Rule from "./rules/rule7.js"; type AutoModerationRuleData = Omit & { exemptChannels?: string[], @@ -24,7 +24,7 @@ type Rule = { execute(execution: AutoModerationActionExecution): Promise; describe(autoModerationRule: AutoModerationRule): Localized<(groups: {}) => string>; }; -const hyperlink: Rule = hyperlinkRule; +const link: Rule = linkRule; const rule7: Rule = rule7Rule; export type {Rule as default}; export type { @@ -33,6 +33,6 @@ export type { AutoModerationRuleData, }; export { - hyperlink, + link, rule7, }; diff --git a/src/rules/hyperlink.ts b/src/rules/link.ts similarity index 62% rename from src/rules/hyperlink.ts rename to src/rules/link.ts index 2c5279a..dd7d047 100644 --- a/src/rules/hyperlink.ts +++ b/src/rules/link.ts @@ -10,9 +10,9 @@ import type { ThreadChannel, } from "discord.js"; import type {Canvas, CanvasRenderingContext2D, Image} from "canvas"; -import type {Hyperlink as HyperlinkCompilation} from "../compilations.js"; -import type {Hyperlink as HyperlinkDefinition} from "../definitions.js"; -import type {Hyperlink as HyperlinkDependency} from "../dependencies.js"; +import type {Link as LinkCompilation} from "../compilations.js"; +import type {Link as LinkDefinition} from "../definitions.js"; +import type {Link as LinkDependency} from "../dependencies.js"; import type Rule from "../rules.js"; import type {AutoModerationActionExecution, AutoModerationRule, AutoModerationRuleData} from "../rules.js"; import type {Locale, Localized} from "../utils/string.js"; @@ -23,24 +23,24 @@ import { ChannelType, } from "discord.js"; import canvas from "canvas"; -import {hyperlink as hyperlinkCompilation} from "../compilations.js"; -import {hyperlink as hyperlinkDefinition} from "../definitions.js"; +import {link as linkCompilation} from "../compilations.js"; +import {link as linkDefinition} from "../definitions.js"; import {composeAll, localize} from "../utils/string.js"; -type HelpWithChannelsGroups = HyperlinkDependency["helpWithChannels"]; +type HelpWithChannelsGroups = LinkDependency["helpWithChannels"]; const { ruleName, ruleReason, -}: HyperlinkDefinition = hyperlinkDefinition; +}: LinkDefinition = linkDefinition; const { helpWithChannels: helpWithChannelsLocalizations, helpWithoutChannels: helpWithoutChannelsLocalizations, -}: HyperlinkCompilation = hyperlinkCompilation; +}: LinkCompilation = linkCompilation; const { - SHICKA_HYPERLINK_DEFAULT_ALERT_ACTION_CHANNEL, - SHICKA_HYPERLINK_DEFAULT_EXEMPT_CHANNELS, - SHICKA_HYPERLINK_DEFAULT_EXEMPT_ROLES, - SHICKA_HYPERLINK_REACTION_EMOJI, - SHICKA_HYPERLINK_OVERRIDE_RULES_CHANNEL, + SHICKA_LINK_DEFAULT_ALERT_ACTION_CHANNEL, + SHICKA_LINK_DEFAULT_EXEMPT_CHANNELS, + SHICKA_LINK_DEFAULT_EXEMPT_ROLES, + SHICKA_LINK_REACTION_EMOJI, + SHICKA_LINK_OVERRIDE_RULES_CHANNEL, }: NodeJS.ProcessEnv = process.env; const {createCanvas, loadImage}: any = canvas; const ruleTriggerRegexPatterns: string[] = [ @@ -51,13 +51,13 @@ const ruleTriggerRegexPatterns: string[] = [ "", "https?:///*\\S+", ]; -const ruleAlertActionChannel: string = SHICKA_HYPERLINK_DEFAULT_ALERT_ACTION_CHANNEL ?? ""; -const ruleExemptChannels: string[] | null = SHICKA_HYPERLINK_DEFAULT_EXEMPT_CHANNELS != null ? SHICKA_HYPERLINK_DEFAULT_EXEMPT_CHANNELS.split("\n") : null; -const ruleExemptRoles: string[] | null = SHICKA_HYPERLINK_DEFAULT_EXEMPT_ROLES != null ? SHICKA_HYPERLINK_DEFAULT_EXEMPT_ROLES.split("\n") : null; -const ruleRulesChannel: string | null = SHICKA_HYPERLINK_OVERRIDE_RULES_CHANNEL ?? null; -const ruleReactionEmoji: string = SHICKA_HYPERLINK_REACTION_EMOJI ?? ""; +const ruleAlertActionChannel: string = SHICKA_LINK_DEFAULT_ALERT_ACTION_CHANNEL ?? ""; +const ruleExemptChannels: string[] | null = SHICKA_LINK_DEFAULT_EXEMPT_CHANNELS != null ? SHICKA_LINK_DEFAULT_EXEMPT_CHANNELS.split("\n") : null; +const ruleExemptRoles: string[] | null = SHICKA_LINK_DEFAULT_EXEMPT_ROLES != null ? SHICKA_LINK_DEFAULT_EXEMPT_ROLES.split("\n") : null; +const ruleRulesChannel: string | null = SHICKA_LINK_OVERRIDE_RULES_CHANNEL ?? null; +const ruleReactionEmoji: string = SHICKA_LINK_REACTION_EMOJI ?? ""; const ruleAvatar: string = await (async (): Promise => { - const url: string = `data:image/svg+xml;charset=utf-8,`; + const url: string = `data:image/svg+xml;charset=utf-8,`; const image: Image = await loadImage(url); const canvas: Canvas = createCanvas(256, 256); const context: CanvasRenderingContext2D = canvas.getContext("2d"); @@ -65,7 +65,7 @@ const ruleAvatar: string = await (async (): Promise => { const data: string = canvas.toDataURL(); return data; })(); -const hyperlinkRule: Rule = { +const linkRule: Rule = { register(): AutoModerationRuleData { return { name: ruleName, @@ -148,11 +148,6 @@ const hyperlinkRule: Rule = { } } catch {} try { - await message.react("🇭"); - await message.react("🇾"); - await message.react("🇵"); - await message.react("🇪"); - await message.react("🇷"); await message.react("🇱"); await message.react("🇮"); await message.react("🇳"); @@ -192,4 +187,4 @@ const hyperlinkRule: Rule = { })) : helpWithoutChannelsLocalizations; }, }; -export default hyperlinkRule; +export default linkRule;