mirror of
https://github.com/spacebarchat/server.git
synced 2026-11-23 00:18:06 +00:00
Use message.create
This commit is contained in:
1 parent
38216b26bd
commit
0fb3306a25
2 files changed
+2
-1
No files matched your search
@@ -256,7 +256,7 @@ export class Message extends BaseClass {
|
||||
}
|
||||
|
||||
static async createWithDefaults(opts: Partial<Message>): Promise<Message> {
|
||||
const message = new Message();
|
||||
const message = Message.create();
|
||||
|
||||
if (!opts.author) {
|
||||
if (!opts.author_id) throw new Error("Either author or author_id must be provided to create a Message");
|
||||
|
||||
Reference in new issue
Block a user