toString method

  1. @override
String toString()
override

Returns this in discord notification format

Example :

final Emoji? emoji = guild.emojis.cache.get('240561194958716924');
if (emoji != null) {
  print(emoji.toString()) // print('<label:240561194958716924>')
  print('$emoji') // print('<label:240561194958716924>')
}

Implementation

@override
String toString () => isAnimated
  ? '<a:$label:$id>'
  : '<:$label:$id>';