setBanner method

Future<void> setBanner(
  1. File banner, {
  2. String? reason,
})

Set the server's banner.

await server.assets.setBanner(File('banner.png'), reason: 'Testing');

Implementation

Future<void> setBanner(File banner, {String? reason}) async {
  final bannerAsset = ImageAsset.makeAsset(banner);
  await _serverPart.updateServer(
      serverId, {'banner': bannerAsset.makeUrl()}, reason);
}