Don't require View Channel permission
This commit is contained in:
parent
6ae1096d79
commit
d7515f3611
@ -73,7 +73,6 @@ async fn check_self_permissions(ctx: Context<'_>) -> bool {
|
|||||||
if let Some(permissions) = app_permissions {
|
if let Some(permissions) = app_permissions {
|
||||||
return if permissions.send_messages()
|
return if permissions.send_messages()
|
||||||
&& permissions.embed_links()
|
&& permissions.embed_links()
|
||||||
&& permissions.view_channel()
|
|
||||||
&& manage_webhooks
|
&& manage_webhooks
|
||||||
{
|
{
|
||||||
true
|
true
|
||||||
@ -82,14 +81,12 @@ async fn check_self_permissions(ctx: Context<'_>) -> bool {
|
|||||||
.send(CreateReply::default().content(format!(
|
.send(CreateReply::default().content(format!(
|
||||||
"The bot appears to be missing some permissions:
|
"The bot appears to be missing some permissions:
|
||||||
|
|
||||||
{} **View Channel**
|
|
||||||
{} **Send Message**
|
{} **Send Message**
|
||||||
{} **Embed Links**
|
{} **Embed Links**
|
||||||
{} **Manage Webhooks**
|
{} **Manage Webhooks**
|
||||||
|
|
||||||
Please check the bot's roles, and any channel overrides. Alternatively, giving the bot
|
Please check the bot's roles, and any channel overrides. Alternatively, giving the bot
|
||||||
\"Administrator\" will bypass permission checks",
|
\"Administrator\" will bypass permission checks",
|
||||||
if permissions.view_channel() { "✅" } else { "❌" },
|
|
||||||
if permissions.send_messages() { "✅" } else { "❌" },
|
if permissions.send_messages() { "✅" } else { "❌" },
|
||||||
if permissions.embed_links() { "✅" } else { "❌" },
|
if permissions.embed_links() { "✅" } else { "❌" },
|
||||||
if manage_webhooks { "✅" } else { "❌" },
|
if manage_webhooks { "✅" } else { "❌" },
|
||||||
|
Loading…
Reference in New Issue
Block a user