Skip to content

Commit fe1457c

Browse files
committed
Added update method.
1 parent 11f3118 commit fe1457c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/js/discord-interface.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ class DiscordInterface {
104104
received.reply(content);
105105
}
106106

107+
update = (message, content) => message
108+
.edit(content)
109+
.then(updatedMessage => this._logger.log(`Updated ${message.id} to "${updatedMessage.content}"`))
110+
.catch(e => this._logger.error(`could not delete reply with id=${message.id}`, e));
111+
112+
107113
/**
108114
* @param {Channel} channel
109115
* @param messageId

0 commit comments

Comments
 (0)