mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Fix error when editing non-saved messages
This commit is contained in:
parent
fecd9d96a9
commit
022fcc537e
1 changed files with 2 additions and 0 deletions
|
@ -200,6 +200,8 @@ export class GuildSavedMessages extends BaseRepository {
|
|||
|
||||
async saveEdit(id, newData: ISavedMessageData) {
|
||||
const oldMessage = await this.messages.findOne(id);
|
||||
if (!oldMessage) return;
|
||||
|
||||
const newMessage = { ...oldMessage, data: newData };
|
||||
|
||||
await this.messages.update(
|
||||
|
|
Loading…
Add table
Reference in a new issue