From d6cb0e3c78b437d5eb42e59e022bd84733fbba36 Mon Sep 17 00:00:00 2001 From: murm Date: Wed, 15 Mar 2023 10:45:14 -0400 Subject: [PATCH] fixed restart cmd --- commands/general/restart.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/commands/general/restart.js b/commands/general/restart.js index 087dea8..4ad39b0 100644 --- a/commands/general/restart.js +++ b/commands/general/restart.js @@ -7,9 +7,13 @@ class RestartCommand extends Command { this.success = false; return "Only the bot owner can restart me!"; } - await this.channel.createMessage(Object.assign({ - content: "mrmBot is restarting." - }, this.reference)); + const content = { + body: "mrmBot is restarting", + msgtype: "m.text", + }; + matrixClient.sendEvent(this.channel, "m.room.message", content, "", (err, res) => { + console.log(err); + }); process.exit(1); }