mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
fix: add await for better errors
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user