Fix /echo mishandling non-string values

This commit is contained in:
Cohee 2024-07-09 01:26:15 +03:00
parent abdd1f3e6e
commit daa582bb73
1 changed files with 3 additions and 0 deletions

View File

@ -2015,6 +2015,9 @@ async function echoCallback(args, value) {
args.severity = null;
}
// Make sure that the value is a string
value = String(value);
const title = args.title ? args.title : undefined;
const severity = args.severity ? args.severity : 'info';