setChannel method

Future<void> setChannel(
  1. Snowflake channelId
)

Update the avatar of this

Example :

await webhook.setChannel('xxxxxxx');

Implementation

Future<void> setChannel (Snowflake channelId) async {
  Response response = await ioc.use<HttpService>().patch(url: "/webhooks/$id", payload: { 'channel_id': channelId });

  if (response.statusCode == 200) {
    _channelId = channelId;
  }
}