Commit 06d1cf9a authored by nanahira's avatar nanahira

trace last message in chain

parent 5e24b721
......@@ -60,8 +60,12 @@ class Utility extends base {
}
async saveLastMessage(session: Session) {
const lastMessage = new LastMessage().fromSession(session);
return this.aragami.set(lastMessage);
const message = new LastMessage().fromSession(session);
const previousSaving = await this.aragami.get(LastMessage, session.guildId);
if (previousSaving && session.userId === previousSaving.userId) {
message.content = previousSaving.content + '\n' + message.content;
}
return this.aragami.set(message);
}
async fetchLastMessage(session: Session) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment