When using interaction.response.send_message() and a ctx.send or blahblah_channel.send() if yo put the channel.send before it acts like an interaction and throws a already responded error
Reproduction Steps
I have a ticket_channel.send() then an interaction.response.send_message()
then when i press the button i get an error: interaction already responded to.
Minimal Reproducible Code
@discord.ui.button(label='\U0001f4e9 Create Ticket',custom_id="ticket",style=discord.ButtonStyle.secondary)asyncdefticket(self,button:discord.ui.Button,interaction:discord.Interaction):withopen("data.json")asf:data=json.load(f)ticket_channel=awaitinteraction.guild.create_text_channel("ticket-{}".format(ticket_number))message_content="Please wait and a moderator will assist you! To close this ticket press the `Close` button below"em=discord.Embed(title="New ticket from {}#{}".format(interaction.user.name,interaction.user.discriminator),description=f"{message_content}{pinged_msg_content}",color=0x00a8ff)view=Close()awaitticket_channel.send(embed=em,view=view)em3=discord.Embed(title="TMS Tickets",description="Your ticket has been created at {}".format(ticket_channel.mention),color=0x00a8ff)awaitinteraction.response.send_message(embed=em3,ephemeral=True)
Expected Results
It to work, and it to send the message to the ticket channel then respond to the interaction
Actual Results
It responds then sends the ticket message 2 times, and throws an error saying its already been responded to. (this is a persistent view btw)
Intents
discord.Intents.all()
System Information
Python v3.9.6-final
discord.py v2.0.0-alpha
discord.py pkg_resources: v2.0.0a3637+g0637a628
aiohttp v3.7.4.post0
Checklist
I have searched the open issues for duplicates.
I have shown the entire traceback, if possible.
I have removed my token from display, if visible.
Additional Context
No response
### Summary
When using interaction.response.send_message() and a ctx.send or blahblah_channel.send() if yo put the channel.send before it acts like an interaction and throws a already responded error
### Reproduction Steps
I have a ticket_channel.send() then an interaction.response.send_message()
then when i press the button i get an error: interaction already responded to.
### Minimal Reproducible Code
```python
@discord.ui.button(label='\U0001f4e9 Create Ticket', custom_id="ticket", style=discord.ButtonStyle.secondary)
async def ticket(self, button: discord.ui.Button, interaction: discord.Interaction):
with open("data.json") as f:
data = json.load(f)
ticket_channel = await interaction.guild.create_text_channel("ticket-{}".format(ticket_number))
message_content = "Please wait and a moderator will assist you! To close this ticket press the `Close` button below"
em = discord.Embed(
title="New ticket from {}#{}".format(interaction.user.name, interaction.user.discriminator),
description=f"{message_content} {pinged_msg_content}", color=0x00a8ff)
view = Close()
await ticket_channel.send(embed=em, view=view)
em3 = discord.Embed(title="TMS Tickets",
description="Your ticket has been created at {}".format(
ticket_channel.mention),
color=0x00a8ff)
await interaction.response.send_message(embed=em3, ephemeral=True)
```
### Expected Results
It to work, and it to send the message to the ticket channel then respond to the interaction
### Actual Results
It responds then sends the ticket message 2 times, and throws an error saying its already been responded to. (this is a persistent view btw)
### Intents
discord.Intents.all()
### System Information
Python v3.9.6-final
- discord.py v2.0.0-alpha
- discord.py pkg_resources: v2.0.0a3637+g0637a628
- aiohttp v3.7.4.post0
### Checklist
- [x] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.
### Additional Context
_No response_
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
When using interaction.response.send_message() and a ctx.send or blahblah_channel.send() if yo put the channel.send before it acts like an interaction and throws a already responded error
Reproduction Steps
I have a ticket_channel.send() then an interaction.response.send_message()
then when i press the button i get an error: interaction already responded to.
Minimal Reproducible Code
Expected Results
It to work, and it to send the message to the ticket channel then respond to the interaction
Actual Results
It responds then sends the ticket message 2 times, and throws an error saying its already been responded to. (this is a persistent view btw)
Intents
discord.Intents.all()
System Information
Python v3.9.6-final
Checklist
Additional Context
No response
Can you shorten your MRE to be an actual minimal example, it would help you debug this as well as us (we don't have half of these variables)