diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-03-13 22:00:22 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-03-13 22:00:22 -0400 |
commit | cfcf16ae61dbb313a9b32afd4711a1f1e6a2b4fb (patch) | |
tree | 8ec0be6eec71f412dbbe51de67eb8a51fa53667c /src/lib/models/instance/Guild.ts | |
parent | 142fe78f76d1e04b480da09f5e36cb70b98e24ff (diff) | |
download | tanzanite-cfcf16ae61dbb313a9b32afd4711a1f1e6a2b4fb.tar.gz tanzanite-cfcf16ae61dbb313a9b32afd4711a1f1e6a2b4fb.tar.bz2 tanzanite-cfcf16ae61dbb313a9b32afd4711a1f1e6a2b4fb.zip |
fix: make replaceNullWith a function
Diffstat (limited to 'src/lib/models/instance/Guild.ts')
-rw-r--r-- | src/lib/models/instance/Guild.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/models/instance/Guild.ts b/src/lib/models/instance/Guild.ts index 1a1ff35..49bf822 100644 --- a/src/lib/models/instance/Guild.ts +++ b/src/lib/models/instance/Guild.ts @@ -188,13 +188,13 @@ export interface GuildSetting { type: GuildSettingType; subType: ChannelType[] | undefined; configurable: boolean; - replaceNullWith: string | null; + replaceNullWith: () => string | null; } const asGuildSetting = <T>(et: { [K in keyof T]: PartialBy<GuildSetting, 'configurable' | 'subType' | 'replaceNullWith'> }) => { for (const key in et) { et[key].subType ??= undefined; et[key].configurable ??= true; - et[key].replaceNullWith ??= null; + et[key].replaceNullWith ??= () => null; } return et as { [K in keyof T]: GuildSetting }; }; @@ -204,7 +204,7 @@ export const guildSettingsObj = asGuildSetting({ name: 'Prefix', description: 'The phrase required to trigger text commands in this server.', type: 'string', - replaceNullWith: client.config.prefix + replaceNullWith: () => client.config.prefix }, autoPublishChannels: { name: 'Auto Publish Channels', |