From 1bd061f095b2f73dd3eda4f6e2e447c6c85d3ba4 Mon Sep 17 00:00:00 2001 From: LucasB25 <50886682+LucasB25@users.noreply.github.com> Date: Fri, 16 Aug 2024 18:50:10 +0200 Subject: [PATCH] fix permission --- locales/Bulgarian.json | 13 ++++----- locales/Croatian.json | 13 ++++----- locales/Czech.json | 13 ++++----- locales/Danish.json | 13 ++++----- locales/Dutch.json | 13 ++++----- locales/EnglishGB.json | 13 ++++----- locales/EnglishUS.json | 12 +++----- locales/Finnish.json | 13 ++++----- locales/Greek.json | 13 ++++----- locales/Hungarian.json | 13 ++++----- locales/Italian.json | 13 ++++----- locales/Lithuanian.json | 13 ++++----- locales/PortugueseBR.json | 13 ++++----- locales/Romanian.json | 13 ++++----- locales/Swedish.json | 13 ++++----- locales/Thai.json | 13 ++++----- locales/Turkish.json | 13 ++++----- locales/Ukrainian.json | 13 ++++----- src/events/client/InteractionCreate.ts | 36 +++++++++++++----------- src/events/client/MessageCreate.ts | 39 +++++++++++++------------- 20 files changed, 127 insertions(+), 181 deletions(-) diff --git a/locales/Bulgarian.json b/locales/Bulgarian.json index c7e529d9c..92f1b2581 100644 --- a/locales/Bulgarian.json +++ b/locales/Bulgarian.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Croatian.json b/locales/Croatian.json index c7e529d9c..92f1b2581 100644 --- a/locales/Croatian.json +++ b/locales/Croatian.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Czech.json b/locales/Czech.json index c7e529d9c..92f1b2581 100644 --- a/locales/Czech.json +++ b/locales/Czech.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Danish.json b/locales/Danish.json index c7e529d9c..92f1b2581 100644 --- a/locales/Danish.json +++ b/locales/Danish.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Dutch.json b/locales/Dutch.json index c7e529d9c..92f1b2581 100644 --- a/locales/Dutch.json +++ b/locales/Dutch.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/EnglishGB.json b/locales/EnglishGB.json index c7e529d9c..92f1b2581 100644 --- a/locales/EnglishGB.json +++ b/locales/EnglishGB.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/EnglishUS.json b/locales/EnglishUS.json index c6c5cbb8a..92f1b2581 100644 --- a/locales/EnglishUS.json +++ b/locales/EnglishUS.json @@ -550,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -568,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Finnish.json b/locales/Finnish.json index c7e529d9c..92f1b2581 100644 --- a/locales/Finnish.json +++ b/locales/Finnish.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Greek.json b/locales/Greek.json index c7e529d9c..92f1b2581 100644 --- a/locales/Greek.json +++ b/locales/Greek.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Hungarian.json b/locales/Hungarian.json index c7e529d9c..92f1b2581 100644 --- a/locales/Hungarian.json +++ b/locales/Hungarian.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Italian.json b/locales/Italian.json index c7e529d9c..92f1b2581 100644 --- a/locales/Italian.json +++ b/locales/Italian.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Lithuanian.json b/locales/Lithuanian.json index c7e529d9c..92f1b2581 100644 --- a/locales/Lithuanian.json +++ b/locales/Lithuanian.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/PortugueseBR.json b/locales/PortugueseBR.json index c7e529d9c..92f1b2581 100644 --- a/locales/PortugueseBR.json +++ b/locales/PortugueseBR.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Romanian.json b/locales/Romanian.json index c7e529d9c..92f1b2581 100644 --- a/locales/Romanian.json +++ b/locales/Romanian.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Swedish.json b/locales/Swedish.json index c7e529d9c..92f1b2581 100644 --- a/locales/Swedish.json +++ b/locales/Swedish.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Thai.json b/locales/Thai.json index c7e529d9c..92f1b2581 100644 --- a/locales/Thai.json +++ b/locales/Thai.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Turkish.json b/locales/Turkish.json index c7e529d9c..92f1b2581 100644 --- a/locales/Turkish.json +++ b/locales/Turkish.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/locales/Ukrainian.json b/locales/Ukrainian.json index c7e529d9c..92f1b2581 100644 --- a/locales/Ukrainian.json +++ b/locales/Ukrainian.json @@ -240,6 +240,7 @@ }, "grab": { "description": "Grabs the current playing song on your DM", + "loading": "Loading...", "content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})", "check_dm": "Please check your DM.", "dm_failed": "I couldn't send you a DM. Please make sure allow direct messages is turned on." @@ -549,10 +550,8 @@ "event": { "interaction": { "setup_channel": "You can't use this command in the setup channel.", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", @@ -567,10 +566,8 @@ }, "message": { "prefix_mention": "Hey, my prefix for this server is `{prefix}`. Want more info? then do `{prefix}help`\nStay Safe, Stay Awesome!", - "no_send_message": "I don't have **`SendMessage`** permission in `{guild}`\nchannel: {channel}.", - "no_embed_links": "I don't have **`EmbedLinks`** permission.", - "no_read_message_history": "I don't have **`ReadMessageHistory`** permission.", - "no_permission": "I don't have enough permissions to execute this command.", + "no_send_message": "I don't have **`SendMessage`**, **`ViewChannel`**, **`EmbedLinks`** or **`ReadMessageHistory`** permission in `{guild}`\nchannel: {channel}.", + "no_permission": "I don't have {permissions} permission.", "no_user_permission": "You don't have enough permissions to use this command.", "no_voice_channel": "You must be connected to a voice channel to use this `{command}` command.", "no_connect_permission": "I don't have `CONNECT` permissions to execute this `{command}` command.", diff --git a/src/events/client/InteractionCreate.ts b/src/events/client/InteractionCreate.ts index cc645e8a8..439f75035 100644 --- a/src/events/client/InteractionCreate.ts +++ b/src/events/client/InteractionCreate.ts @@ -52,7 +52,14 @@ export default class InteractionCreate extends Event { const clientMember = interaction.guild.members.resolve(this.client.user); if (!(interaction.inGuild() && interaction.channel.permissionsFor(clientMember)?.has(PermissionFlagsBits.ViewChannel))) return; - if (!clientMember.permissions.has(PermissionFlagsBits.SendMessages)) { + if ( + !( + clientMember.permissions.has(PermissionFlagsBits.ViewChannel) && + clientMember.permissions.has(PermissionFlagsBits.SendMessages) && + clientMember.permissions.has(PermissionFlagsBits.EmbedLinks) && + clientMember.permissions.has(PermissionFlagsBits.ReadMessageHistory) + ) + ) { return await (interaction.member as GuildMember) .send({ content: T(locale, "event.interaction.no_send_message", { @@ -63,25 +70,20 @@ export default class InteractionCreate extends Event { .catch(() => {}); } - if (!clientMember.permissions.has(PermissionFlagsBits.EmbedLinks)) { - return await interaction.reply({ - content: T(locale, "event.interaction.no_embed_links"), - }); - } - - if (!clientMember.permissions.has(PermissionFlagsBits.ReadMessageHistory)) { - return await interaction.reply({ - content: T(locale, "event.interaction.no_read_message_history"), - }); - } - const logs = this.client.channels.cache.get(this.client.config.commandLogs); if (command.permissions) { - if (command.permissions.client && !clientMember.permissions.has(command.permissions.client)) { - return await interaction.reply({ - content: T(locale, "event.interaction.no_permission"), - }); + if (command.permissions.client) { + const missingClientPermissions = command.permissions.client.filter((perm) => !clientMember.permissions.has(perm)); + + if (missingClientPermissions.length > 0) { + return await interaction.reply({ + content: T(locale, "event.interaction.no_permission", { + permissions: missingClientPermissions.map((perm) => `\`${perm}\``).join(", "), + }), + ephemeral: true, + }); + } } if (command.permissions.user && !(interaction.member as GuildMember).permissions.has(command.permissions.user)) { diff --git a/src/events/client/MessageCreate.ts b/src/events/client/MessageCreate.ts index 1a5b511e6..ee10b66f7 100644 --- a/src/events/client/MessageCreate.ts +++ b/src/events/client/MessageCreate.ts @@ -59,7 +59,14 @@ export default class MessageCreate extends Event { if (!message.guild.members.resolve(this.client.user)?.permissions.has(PermissionFlagsBits.ViewChannel)) return; const clientMember = message.guild.members.resolve(this.client.user); - if (!clientMember.permissions.has(PermissionFlagsBits.SendMessages)) { + if ( + !( + clientMember.permissions.has(PermissionFlagsBits.ViewChannel) && + clientMember.permissions.has(PermissionFlagsBits.SendMessages) && + clientMember.permissions.has(PermissionFlagsBits.EmbedLinks) && + clientMember.permissions.has(PermissionFlagsBits.ReadMessageHistory) + ) + ) { await message.author .send({ content: T(locale, "event.message.no_send_message", { @@ -71,26 +78,18 @@ export default class MessageCreate extends Event { return; } - if (!clientMember.permissions.has(PermissionFlagsBits.EmbedLinks)) { - await message.reply({ - content: T(locale, "event.message.no_embed_links"), - }); - return; - } - - if (!clientMember.permissions.has(PermissionFlagsBits.ReadMessageHistory)) { - await message.reply({ - content: T(locale, "event.interaction.no_read_message_history"), - }); - return; - } - if (command.permissions) { - if (command.permissions.client && !clientMember.permissions.has(command.permissions.client)) { - await message.reply({ - content: T(locale, "event.message.no_permission"), - }); - return; + if (command.permissions.client) { + const missingClientPermissions = command.permissions.client.filter((perm) => !clientMember.permissions.has(perm)); + + if (missingClientPermissions.length > 0) { + await message.reply({ + content: T(locale, "event.interaction.no_permission", { + permissions: missingClientPermissions.map((perm) => `\`${perm}\``).join(", "), + }), + }); + return; + } } if (command.permissions.user && !message.member.permissions.has(command.permissions.user)) {