toString method

  1. @override
String toString()
override

Returns this in discord notification format

Example :

final Role? role = guild.roles.cache.get('240561194958716924');
if (role != null) {
  print(role.toString()) // print('<@&240561194958716924>')
  print('$role') // print('<@&240561194958716924>')
}

Implementation

@override
String toString () => '<@&$id>';