#🔒 The command does not display personal links
12 messages · Page 1 of 1 (latest)
@visual jacinth
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
wtf
Hey @visual jacinth, our bot is deleting the message because of the invite (you should get a DM)
!paste
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
Can you post it here^?
This command is related to server invitations
I understand, our bot is triggering on https://discord.gg/{invite.code}
Hi all! I am developing my bot in the Python programming language and the disnake.py library and I created the command ">invite-info" and it works on regular servers, it shows information in which channel and to which server the invite link is made, but I am faced with the problem that this the command stops working when I write this command with a personal link.
Here's an example:
инвайт-инфо https://discord.gg/python
And the bot stupidly does not respond to the request. Please help me because I don’t know how to fix this.
Here's the code:
@bot.command(name="инвайт-инфо", aliases=["Инвайт-инфо"])
async def инвайт_инфо(ctx, invite_url: str):
try:
invite = await bot.fetch_invite(invite_url)
except disnake.NotFound:
embed = disnake.Embed(description=f"❌ Приглашение не найдено. Убедитесь, что ссылка правильная.", color=0xc80005)
return await ctx.send(embed=embed)
except disnake.HTTPException:
embed = disnake.Embed(description=f"❌ Произошла ошибка при получении информации о приглашении.", color=0xc80005)
return await ctx.send(embed=embed)
offline_count = invite.approximate_member_count - invite.approximate_presence_count
embed = disnake.Embed(title="Информация о приглашении", description=f"Код: [`{invite.code}`]({invite_link})\nСервер: `{invite.guild.name}` (ID: {invite.guild.id})\nКанал: `{invite.channel.name}` (ID: {invite.channel.id})\nАвтор: `{invite.inviter.name}` (ID: {invite.inviter.id})", color=0x2b2d31)
embed.add_field(name="По статусам", value=f"Участников: **{invite.approximate_member_count}**\nОнлайн: **{invite.approximate_presence_count}**\nОффлайн: **{offline_count}**")
await ctx.send(embed=embed)
yes
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.