setSystemChannel method

Future<void> setSystemChannel(
  1. TextChannel channel
)

Update system channel of this

Example :

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

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

Implementation

Future<void> setSystemChannel (TextChannel channel) async {
  Http http = ioc.singleton(Service.http);
  Response response = await http.patch(url: "/guilds/$id", payload: { 'system_channel_id': channel.id });

  if (response.statusCode == 200) {
    _systemChannelId = channel.id;
    systemChannel = channel;
  }
}