@botkit@hollo.social · Reply to BotKit by Fedify :botkit:

@liaizon You can get the location data through Message.raw property!

bot.onMention = async (session, message) => {
  const location = await message.raw.getLocation();
  if (location instanceof Place) {
    console.log(location.name);
    console.log(location.longitude);
    console.log(location.latitude);
  }
};

See also the Place class from Fedify.

jsr.io

Place - @fedify/fedify - JSR

@fedify/fedify on JSR: An ActivityPub/fediverse server framework