xooniverse / televerse

Your gateway to seamless Telegram Bot Development 💙
https://televerse.xooniverse.com
BSD 3-Clause "New" or "Revised" License
64 stars 11 forks source link

TeleverseException: The update type is UpdateType.callbackQuery, which does not have a chat. #277

Closed HeySreelal closed 4 months ago

HeySreelal commented 4 months ago

Code:

Future<void> revealCallbackHandler(Context ctx) async {
  await ctx.answerCallbackQuery();
  await ctx.editMessageMedia(
    InputMediaAnimation(
      media: InputFile.fromUrl("some-animation-url"),
    ),
  );
}

Occurred when editMessageMedia is invoked.

Context: The callback query was initiated from a inline button attached to an inline message.

Stack Trace

Just in case if I forgets :)

#0      Context.id (package:televerse/src/televerse/context/context.dart:30:7)
#1      Context.editMessageMedia (package:televerse/src/televerse/context/context.dart:1757:15)
#2      revealHandler (package:mybot/mybot.dart:146:13)
<asynchronous suspension>
#3      Bot._processUpdate (package:televerse/src/televerse/bot.dart:295:9)
<asynchronous suspension>
#4      Bot._onUpdate (package:televerse/src/televerse/bot.dart:386:9)
<asynchronous suspension>