unpin method

Future<void> unpin()

Unpin this message

await message.unpin();

Implementation

Future<void> unpin () async {
  if (!isPinned) {
    ioc.use<ConsoleService>().warn('Message $id isn\'t pinned');
    return;
  }

  await ioc.use<DiscordApiHttpService>()
    .destroy(url: '/channels/${channel.id}/pins/$id')
    .build();
}