setMessageNotification method

Future<void> setMessageNotification(
  1. int level
)

Defines the notification level of this

  • 0 → All messages
  • 1 → Only mentions

Example :

await guild.setMessageNotification(1);

Implementation

Future<void> setMessageNotification (int level) async {
  Http http = ioc.singleton(Service.http);
  Response response = await http.patch(url: "/guilds/$id", payload: { 'default_message_notifications': level });

  if (response.statusCode == 200) {
    _defaultMessageNotifications = level;
  }
}