Skip to content

Instantly share code, notes, and snippets.

View SitiSchu's full-sized avatar

Simon Schürrle SitiSchu

View GitHub Profile
'use strict';
const getLongCodeBlocks = msg =>
(msg.entities || [])
.filter(entity => entity.type == 'pre')
.filter(({ offset, length }) => msg.text
.slice(offset, offset + length)
.split(/\n/g)
.length > 10
);