show different drafts on bard

This commit is contained in:
derpystuff 2023-12-02 01:49:44 +01:00
parent b19f753ae0
commit a0a0e2d492
8 changed files with 103 additions and 12 deletions

View file

@ -29,7 +29,8 @@ module.exports.timestamp = function(time, flag = "t"){
return `<t:${Math.floor(time/1000)}:${flag}>`
}
module.exports.stringwrap = function(content = "", length){
module.exports.stringwrap = function(content = "", length, newlines = true){
if(!newlines) content = content.replace(/\n/, '')
if(content.length > length) return content.substr(0, length) + '...';
return content;
}