pin method

Future<void> pin()

Pin this message

await message.pin();

Implementation

Future<void> pin () async {
  if (isPinned) {
    ioc.use<ConsoleService>().warn('Message $id is already pinned');
    return;
  }

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