From ae3df3217b138c9f73fe50f3609cd087467062e0 Mon Sep 17 00:00:00 2001 From: "Tomachi [ICHIGO]" Date: Thu, 26 Oct 2023 23:03:41 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E3=81=97=E3=81=84jMS=E3=81=AE?= =?UTF-8?q?=E3=81=9F=E3=82=81=E3=81=AB=E3=83=81=E3=83=A3=E3=83=B3=E3=83=8D?= =?UTF-8?q?=E3=83=ABID=E3=81=AA=E3=81=A9=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.ts | 6 +++--- src/events/greeting.ts | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/config.ts b/src/config.ts index e943b160..7401e18a 100644 --- a/src/config.ts +++ b/src/config.ts @@ -10,7 +10,7 @@ export interface ConfigInterface { vcSpeechLog?: string } role?: { - mailVerified?: string + verified?: string } } translateGasUrl?: string @@ -30,8 +30,8 @@ export class Configuration extends ConfigFramework { config.discord.channel?.greeting === undefined || typeof config.discord.channel.greeting === 'string', 'discord.role.mailVerified must be a string': (config) => - config.discord.role?.mailVerified === undefined || - typeof config.discord.role.mailVerified === 'string', + config.discord.role?.verified === undefined || + typeof config.discord.role.verified === 'string', 'translateGasUrl must be a string': (config) => config.translateGasUrl === undefined || typeof config.translateGasUrl === 'string', diff --git a/src/events/greeting.ts b/src/events/greeting.ts index 5b328e4e..99b41612 100644 --- a/src/events/greeting.ts +++ b/src/events/greeting.ts @@ -27,9 +27,9 @@ export class GreetingEvent extends BaseDiscordEvent<'messageCreate'> { async execute(message: Message): Promise { const config: Configuration = this.discord.getConfig() const greetingChannelId = - config.get('discord').channel?.greeting || '603841992404893707' - const mailVerifiedRoleId = - config.get('discord').role?.mailVerified || '597421078817669121' + config.get('discord').channel?.greeting || '1149587870273773569' + const verifiedRoleId = + config.get('discord').role?.verified || '1149583365708709940' // #greeting チャンネル以外は無視 if (message.channel.id !== greetingChannelId) return @@ -45,7 +45,7 @@ export class GreetingEvent extends BaseDiscordEvent<'messageCreate'> { } const member = message.member - const isMailVerified = member.roles.cache.has(mailVerifiedRoleId) + const isMailVerified = member.roles.cache.has(verifiedRoleId) // jao メッセージの場合 if (message.content === 'jao') { @@ -77,7 +77,7 @@ export class GreetingEvent extends BaseDiscordEvent<'messageCreate'> { this.jaoPostedUsers.delete(message.author.id) await message.react('\u2B55') - await message.member.roles.add(mailVerifiedRoleId) + await message.member.roles.add(verifiedRoleId) await message.reply( [