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";
/** Sets a thread channel to be archived. */
export function archiveThread(threadId: bigint) {
return editThread(threadId, { archived: true });
export async function archiveThread(threadId: bigint) {
return await editThread(threadId, { archived: true });
}
+2 -2
View File
@@ -1,6 +1,6 @@
import { editThread } from "./edit_thread.ts";
/** Sets a thread channel to be locked. */
export function lockThread(threadId: bigint) {
return editThread(threadId, { locked: true });
export async function lockThread(threadId: bigint) {
return await editThread(threadId, { locked: true });
}
@@ -1,6 +1,6 @@
import { editThread } from "./edit_thread.ts";
/** Sets a thread channel to be unarchived. */
export function unarchiveThread(threadId: bigint) {
return editThread(threadId, { archived: false });
export async function unarchiveThread(threadId: bigint) {
return await editThread(threadId, { archived: false });
}
@@ -1,6 +1,6 @@
import { editThread } from "./edit_thread.ts";
/** Sets a thread channel to be unlocked. */
export function unlockThread(threadId: bigint) {
return editThread(threadId, { locked: false });
export async function unlockThread(threadId: bigint) {
return await editThread(threadId, { locked: false });
}