From 65fa56d0f46bb69655551384bfa544117b84fefa Mon Sep 17 00:00:00 2001 From: "Tomachi [ICHIGO]" Date: Sun, 16 Jul 2023 12:42:24 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=80=E9=83=A8=E3=81=AE=E3=82=B3?= =?UTF-8?q?=E3=83=9E=E3=83=B3=E3=83=89=E3=81=A7=E7=AE=A1=E7=90=86=E8=80=85?= =?UTF-8?q?=E6=A8=A9=E9=99=90=E3=82=92=E5=BF=85=E8=A6=81=E3=81=A8=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=9F=E3=82=82=E3=81=AE=E3=82=92=E3=82=B5?= =?UTF-8?q?=E3=83=BC=E3=83=90=E7=AE=A1=E7=90=86=E6=A8=A9=E9=99=90=E3=81=BE?= =?UTF-8?q?=E3=81=A7=E4=B8=8B=E3=81=92=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jaoafa/jdavcspeaker/Command/Cmd_Vcname.java | 4 ++-- .../com/jaoafa/jdavcspeaker/Command/Cmd_Vcspeaker.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/jaoafa/jdavcspeaker/Command/Cmd_Vcname.java b/src/main/java/com/jaoafa/jdavcspeaker/Command/Cmd_Vcname.java index 53ab954..3e622e0 100644 --- a/src/main/java/com/jaoafa/jdavcspeaker/Command/Cmd_Vcname.java +++ b/src/main/java/com/jaoafa/jdavcspeaker/Command/Cmd_Vcname.java @@ -45,7 +45,7 @@ public void hooker(JDA jda, Guild guild, void save(Member member, SlashCommandInteractionEvent event) { - if (!member.getId().equals("492088741167366144") && !member.hasPermission(Permission.ADMINISTRATOR)) { + if (!member.hasPermission(Permission.MANAGE_SERVER)) { event.replyEmbeds(new EmbedBuilder() .setTitle(":no_pedestrians: 実行する権限がありません!") .setColor(LibEmbedColor.error) @@ -90,7 +90,7 @@ void save(Member member, SlashCommandInteractionEvent event) { } void saveall(Guild guild, Member member, SlashCommandInteractionEvent event) { - if (!member.getId().equals("492088741167366144") && !member.hasPermission(Permission.ADMINISTRATOR)) { + if (!member.hasPermission(Permission.MANAGE_SERVER)) { event.replyEmbeds(new EmbedBuilder() .setTitle(":no_pedestrians: 実行する権限がありません!") .setColor(LibEmbedColor.error) diff --git a/src/main/java/com/jaoafa/jdavcspeaker/Command/Cmd_Vcspeaker.java b/src/main/java/com/jaoafa/jdavcspeaker/Command/Cmd_Vcspeaker.java index 53f873d..e2a0947 100644 --- a/src/main/java/com/jaoafa/jdavcspeaker/Command/Cmd_Vcspeaker.java +++ b/src/main/java/com/jaoafa/jdavcspeaker/Command/Cmd_Vcspeaker.java @@ -29,7 +29,7 @@ public class Cmd_Vcspeaker implements CmdSubstrate { final EmbedBuilder NO_PERMISSION = new EmbedBuilder() .setDescription(""" - あなたは管理者権限を所持していないため、 + あなたはサーバ管理権限を所持していないため、 このサーバでVCSpeakerの設定をすることはできません。 """) .setColor(LibEmbedColor.error); @@ -72,7 +72,7 @@ public void hooker(JDA jda, Guild guild, } void addServer(Guild guild, GuildMessageChannel channel, Member member, SlashCommandInteractionEvent event) { - if (!member.hasPermission(Permission.ADMINISTRATOR)) { + if (!member.hasPermission(Permission.MANAGE_SERVER)) { event.replyEmbeds(NO_PERMISSION.build()).queue(); return; } @@ -110,7 +110,7 @@ void addServer(Guild guild, GuildMessageChannel channel, Member member, SlashCom } void removeServer(Guild guild, Member member, SlashCommandInteractionEvent event) { - if (!member.hasPermission(Permission.ADMINISTRATOR)) { + if (!member.hasPermission(Permission.MANAGE_SERVER)) { event.replyEmbeds(NO_PERMISSION.build()).queue(); return; } @@ -133,7 +133,7 @@ void removeServer(Guild guild, Member member, SlashCommandInteractionEvent event } void setNotifyChannel(Guild guild, Member member, SlashCommandInteractionEvent event) { - if (!member.hasPermission(Permission.ADMINISTRATOR)) { + if (!member.hasPermission(Permission.MANAGE_SERVER)) { event.replyEmbeds(NO_PERMISSION.build()).queue(); return; } @@ -170,7 +170,7 @@ void setNotifyChannel(Guild guild, Member member, SlashCommandInteractionEvent e } void showDebugQueue(Member member, SlashCommandInteractionEvent event) { - if (!member.hasPermission(Permission.ADMINISTRATOR)) { + if (!member.hasPermission(Permission.MANAGE_SERVER)) { event.replyEmbeds(NO_PERMISSION.build()).queue(); return; }