setPublicUpdateChannel method

Future<void> setPublicUpdateChannel(
  1. TextChannel channel
)

Update public updates channel of this

Example :

final channel = guild.channels.cache.get('240561194958716924');

if (channel != null) {
  await guild.setPublicUpdateChannel(channel);
}

Implementation

Future<void> setPublicUpdateChannel (TextChannel channel) async {
  Response response = await ioc.use<HttpService>().patch(url: "/guilds/$id", payload: { 'public_updates_channel_id': channel.id });

  if (response.statusCode == 200) {
    _publicUpdatesChannelId = channel.id;
    publicUpdatesChannel = channel;
  }
}