Kuby/backups/scratch/test_edit_message.py

18 lines
444 B
Python
Raw Permalink Normal View History

import disnake
import asyncio
async def main():
class DummyResponse:
async def edit_message(self, *args, **kwargs):
print(kwargs)
inter = type('DummyInter', (), {'response': DummyResponse()})()
container = disnake.ui.Container()
try:
await inter.response.edit_message(components=[container])
print("Success")
except Exception as e:
print(f"Error: {e}")
asyncio.run(main())