Skip to content

Commit

Permalink
[fix]Fix config not changed properly
Browse files Browse the repository at this point in the history
(Message improvement, too)
phenylshima committed Dec 5, 2021
1 parent ab5ce69 commit eefd4a9
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -158,7 +158,7 @@ export async function setConfig(prisma: PrismaClient, key: string, value: string
},
create: {
key: key,
value: value
value: _value
}
});

4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -358,13 +358,13 @@ client.on('interactionCreate', async interaction => {
.then(async () => {
config = await constantsconfig.getConfig(prisma);
const after = config[key as keyof constantsconfig.ConfigurationType];
await interaction.editReply(`設定を変更しました。 ${key}: ${before}->${after}`)
await interaction.editReply(`設定を変更しました。 ${key}: ${before} -> ${after}`)
})
.catch(async err => {
if (err instanceof Error && err.message !== "Validation failed") {
console.log(err);
}
await interaction.editReply(`設定の変更に失敗しました。 ${key}: ${before}=>${value}`);
await interaction.editReply(`設定の変更に失敗しました。 ${key}: ${before} -> ${value}`);
});
} else {
await interaction.reply({

0 comments on commit eefd4a9

Please sign in to comment.