Skip to content

Commit

Permalink
fix: reset not work
Browse files Browse the repository at this point in the history
  • Loading branch information
Insiro committed Jul 25, 2022
1 parent 2c0bc2b commit c3efbe5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/sender/Setup/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const resetChannel = async (guild: Guild): Promise<string> => {
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';
};
Expand Down
8 changes: 4 additions & 4 deletions src/sender/Setup/reset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
};
Expand Down
2 changes: 1 addition & 1 deletion src/sender/Setup/role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 '역할설정 초기화 되었습니다.';
}
Expand Down

0 comments on commit c3efbe5

Please sign in to comment.