Function serenity::utils::parse_message_id_pair [−][src]
Expand description
Retrieves IDs from “{channel ID}-{message ID}” (retrieved by shift-clicking on “Copy ID”).
If the string is invalid, None is returned.
Examples
use serenity::model::prelude::*;
use serenity::utils::parse_message_id_pair;
assert_eq!(
parse_message_id_pair("673965002805477386-842482646604972082"),
Some((ChannelId(673965002805477386), MessageId(842482646604972082))),
);
assert_eq!(
parse_message_id_pair("673965002805477386-842482646604972082-472029906943868929"),
None,
);