A
A
ah0R2021-09-22 11:24:42
Python
ah0R, 2021-09-22 11:24:42

How to bypass the ban on sending Embed messages?

I can send this to personal channels, even without any roles:
614ae7a55b2cb688499171.png
but I can’t go to the project’s marketplace, it gives an error once, and then no errors, just the message is not sent:

Ignoring exception in command g:
Traceback (most recent call last):
  File "C:\Users\ah0R\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "H:\SELF\self.py", line 38, in g
    await res.send(embed = log)
  File "C:\Users\ah0R\AppData\Local\Programs\Python\Python39\lib\site-packages\discord_components\dpy_overrides.py", line 354, in send_override
    return await send(channel, *args, **kwargs)
  File "C:\Users\ah0R\AppData\Local\Programs\Python\Python39\lib\site-packages\discord_components\dpy_overrides.py", line 329, in send
    data = await state.http.send_message(
  File "C:\Users\ah0R\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\http.py", line 248, in request
    raise Forbidden(r, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\ah0R\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\ah0R\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\ah0R\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: Forbidden: 403 Forbidden (error code: 50013): Missing Permissions


The code itself:
import discord
from discord.ext import commands

bot = commands.Bot( command_prefix = '!', self_bot = True)

@bot.event
async def on_ready():
  print("Бот включен")

@bot.command()
async def b(ctx):
    log = discord.Embed(title = '**Продается**',description = '**Барбершоп №3** \n ```Цена: 3.400.000$. ```', colour = 0xFFFF00)
    log.set_thumbnail(url = f'https://media.discordapp.net/attachments/716567643523645470/856089714997985290/-1.png?width=701&height=701')
    log.add_field(name="**Магазин Одежды №11**", value= '``` Цена: 7.100.000$. ```', inline=True)
    log.set_footer(icon_url = 'https://media.discordapp.net/attachments/716567643523645470/856089714997985290/-1.png?width=701&height=701', text = "По поводу Барбершопа: ah0R#2650 \nПо поводу Магазин Одежды: G1zmo_Med#1485")
    res =  bot.get_channel(680543676509978707)
    await res.send(embed = log)


Is it possible to solve this problem somehow or is it blocked without a workaround?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-09-22
@Vindicar

1. What intents are you requesting?
2. Have the appropriate rights for the bot role been granted in the server settings?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question