fix: add await for better errors

This commit is contained in:
ITOH
2021-06-19 17:14:02 +02:00
parent 0e020fdcd8
commit dea6b1a547
4 changed files with 8 additions and 8 deletions
@@ -1,6 +1,6 @@
import { editThread } from "./edit_thread.ts"; import { editThread } from "./edit_thread.ts";
/** Sets a thread channel to be archived. */ /** Sets a thread channel to be archived. */
export function archiveThread(threadId: bigint) { export async function archiveThread(threadId: bigint) {
return editThread(threadId, { archived: true }); return await editThread(threadId, { archived: true });
} }
+2 -2
View File
@@ -1,6 +1,6 @@
import { editThread } from "./edit_thread.ts"; import { editThread } from "./edit_thread.ts";
/** Sets a thread channel to be locked. */ /** Sets a thread channel to be locked. */
export function lockThread(threadId: bigint) { export async function lockThread(threadId: bigint) {
return editThread(threadId, { locked: true }); return await editThread(threadId, { locked: true });
} }
@@ -1,6 +1,6 @@
import { editThread } from "./edit_thread.ts"; import { editThread } from "./edit_thread.ts";
/** Sets a thread channel to be unarchived. */ /** Sets a thread channel to be unarchived. */
export function unarchiveThread(threadId: bigint) { export async function unarchiveThread(threadId: bigint) {
return editThread(threadId, { archived: false }); return await editThread(threadId, { archived: false });
} }
@@ -1,6 +1,6 @@
import { editThread } from "./edit_thread.ts"; import { editThread } from "./edit_thread.ts";
/** Sets a thread channel to be unlocked. */ /** Sets a thread channel to be unlocked. */
export function unlockThread(threadId: bigint) { export async function unlockThread(threadId: bigint) {
return editThread(threadId, { locked: false }); return await editThread(threadId, { locked: false });
} }