From c3efbe525b1ef89ff82d318b621621643adedbfe Mon Sep 17 00:00:00 2001 From: Insiro Date: Tue, 26 Jul 2022 00:05:51 +0900 Subject: [PATCH] fix: reset not work --- src/sender/Setup/channel.ts | 2 +- src/sender/Setup/reset.ts | 8 ++++---- src/sender/Setup/role.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sender/Setup/channel.ts b/src/sender/Setup/channel.ts index 943c3db..c25cb55 100644 --- a/src/sender/Setup/channel.ts +++ b/src/sender/Setup/channel.ts @@ -26,7 +26,7 @@ const resetChannel = async (guild: Guild): Promise => { const server = await getGuildInfo(guild); if (server === null) return 'failed to set response Channel\nPlz rejoin Bot'; - server.channel = undefined; + server.channel = null; await botServerRepository.save(server); return 'success to reset'; }; diff --git a/src/sender/Setup/reset.ts b/src/sender/Setup/reset.ts index 1bfbecf..ac508b5 100644 --- a/src/sender/Setup/reset.ts +++ b/src/sender/Setup/reset.ts @@ -8,10 +8,10 @@ export const resetServer = async ( if (!interaction.options.getBoolean('check')) return '초기화를 취소하였습니다'; const server = await getGuildInfo(interaction.guild); - server.channel = undefined; - server.role = undefined; - server.clan = undefined; - server.newsChannel = undefined; + server.channel = null; + server.role = null; + server.clan = null; + server.newsChannel = null; await botServerRepository.save(server); return 'success to reset'; }; diff --git a/src/sender/Setup/role.ts b/src/sender/Setup/role.ts index d9a122b..b24a6e0 100644 --- a/src/sender/Setup/role.ts +++ b/src/sender/Setup/role.ts @@ -13,7 +13,7 @@ export const setRole = async ( if (server === null) return 'failed to set Clan Link'; const options = interaction.options; if (options.getBoolean('reset')) { - server.role = undefined; + server.role = null; await botServerRepository.save(server); return '역할설정 초기화 되었습니다.'; }