Comments (3)
Can you make the minimal reproducible code actually minimal? It's hard to understand with multiple nested conditions.
from nextcord.
@nextcord.slash_command(name="bug-test")
async def bugtest(self, interaction):
msg = await interaction.response.send_message("abc1")
msg = await msg.edit("abc2")
msg = await msg.edit("abc3")
Ignoring exception in command <nextcord.application_command.SlashApplicationCommand object at 0x00000244D4B5D3D0>:
Traceback (most recent call last):
File "C:\Users\ng_jo\AppData\Local\Programs\Python\Python312\Lib\site-packages\nextcord\application_command.py", line 918, in invoke_callback_with_hooks
await self(interaction, *args, **kwargs)
File "C:\Users\ng_jo\OneDrive\Backup\Desktop\joshuang\coding\.GITHUBCLONE\Testing-Bot\cogs\dev\__init__.py", line 123, in bugtest
msg = await msg.edit("abc3")
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ng_jo\AppData\Local\Programs\Python\Python312\Lib\site-packages\nextcord\interactions.py", line 1180, in edit
message = await self._state._interaction.edit_original_message(
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ConnectionState' object has no attribute '_interaction'
The above exception was the direct cause of the following exception:
nextcord.errors.ApplicationInvokeError: Command raised an exception: AttributeError: 'ConnectionState' object has no attribute '_interaction'
sorry for the multiple edits, still getting used to the github markdown 😅
from nextcord.
Can reproduce.
As a temporary fix you can not collect the message until the end:
@nextcord.slash_command(name="bug-test")
async def bugtest(self, interaction):
msg = await interaction.response.send_message("abc1")
await msg.edit("abc2")
msg = await msg.edit("abc3")
print(msg.content) # abc3
from nextcord.
Related Issues (20)
- Use `Locale` enum when checking what language has been choosen in examples
- Forum Thread edit tag event is not captured HOT 1
- Regression in StringSelect types HOT 3
- Buttons problem
- @silent message HOT 2
- Add warning for more than 50 slash commandy HOT 6
- Custom_Id in interaction HOT 6
- Use global name if nickname is not available HOT 1
- Webhook creating forum posts
- Webhooks don't use the proxy
- Missing feature for reloading cogs! HOT 1
- Changing the status description of a voice channel HOT 1
- `AuditLogEntry` documentation is missing attributes
- Arg metatdata in Guild.create_scheduled_event is optional, but Discord API requires it HOT 1
- application_checks error HOT 3
- Bot crashing due to the error "aiohttp.http_websocket.WebSocketError: Received fragmented control frame" HOT 1
- DeprecationWarning: 'audioop' is deprecated and slated for removal in Python 3.13 HOT 1
- Get webhooks in Forum, Stage, and Voice channels
- Polls integration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextcord.