storage: make constructors more idiomatic
This commit is contained in:
parent
46fd02605f
commit
651f14d724
5 changed files with 44 additions and 85 deletions
|
@ -13,7 +13,7 @@ static MESSAGE_PATTERN: Lazy<Regex> = Lazy::new(|| {
|
|||
Regex::new(r"/(https?:\/\/)?(?:canary\.|ptb\.)?discord(?:app)?\.com\/channels\/(?<serverId>\d+)\/(?<channelId>\d+)\/(?<messageId>\d+)/g;").unwrap()
|
||||
});
|
||||
|
||||
pub fn find_first_image(msg: &Message) -> Option<String> {
|
||||
fn find_first_image(msg: &Message) -> Option<String> {
|
||||
msg.attachments
|
||||
.iter()
|
||||
.find(|a| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue