mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
16 lines
407 B
TypeScript
16 lines
407 B
TypeScript
import { BotWithCache } from "../../../deps.ts";
|
|
|
|
export default function joinThread(bot: BotWithCache) {
|
|
const joinThreadOld = bot.helpers.joinThread;
|
|
|
|
bot.helpers.joinThread = function (threadId) {
|
|
const channel = bot.channels.get(threadId);
|
|
|
|
if (channel && !channel.archived) {
|
|
throw new Error("You can not join an archived channel.");
|
|
}
|
|
|
|
return joinThreadOld(threadId);
|
|
};
|
|
}
|