-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremoveFont.js
More file actions
32 lines (30 loc) · 847 Bytes
/
removeFont.js
File metadata and controls
32 lines (30 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const func = {
name: "$removeFont",
description: "Converts fonted-text into regular text.",
brackets: true,
execute: async (d, fn) => {
const stringTools = require('string-toolkit')
const data = await fn.resolveArray(d)
if (data[0].length != 0) {
let result = stringTools.decancer(data[0])
return fn.resolve(result)
} else {
let result = ":x: Function **$removeFont** returned a error: \`string\` is a required field, it requires one or more characters inputted!"
return fn.resolve(result)
}
},
fields: [
{
name: "string",
description: "The string to remove fonts from.",
required: true,
type: "STRING"
}
]
}
module.exports = func
/*
Requires string-toolkit installed: npm i string-toolkit
Usage:
$removeFont[text]
*/