making showMoreMessages async to await event emission

This commit is contained in:
qvink
2025-01-22 08:36:47 -07:00
parent 1641b1f91f
commit f1923c5364
3 changed files with 7 additions and 7 deletions

View File

@ -1968,8 +1968,8 @@ export function initDefaultSlashCommands() {
SlashCommandParser.addCommandObject(SlashCommand.fromProps({
name: 'chat-render',
helpString: 'Renders a specified number of messages into the chat window. Displays all messages if no argument is provided.',
callback: (args, number) => {
showMoreMessages(number && !isNaN(Number(number)) ? Number(number) : Number.MAX_SAFE_INTEGER);
callback: async (args, number) => {
await showMoreMessages(number && !isNaN(Number(number)) ? Number(number) : Number.MAX_SAFE_INTEGER);
if (isTrueBoolean(String(args?.scroll ?? ''))) {
$('#chat').scrollTop(0);
}