Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 28 additions & 19 deletions src/features/looking-for-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
} from "discord.js";
import { CHANNELS } from "../constants/channels.js";
import { EMBED_COLOR } from "./commands.js";
import { retry } from "./retry.js";
import { logger } from "./log.js";

const LOCK_POST = "lock-post";

Expand Down Expand Up @@ -47,30 +49,37 @@ export const lookingForGroup = async (bot: Client) => {
return;
}

await thread.send({
embeds: [
{
title: "Looking For Group",
type: EmbedType.Rich,
description: `Projects in this space must be open source licensed and may not be commercially monetized — this is a place for enthusiastic collaboration, and anyone found to be exploiting in any manner, especially for free labor, will be moderatated as a hostile actor.
try {
await retry(thread.fetchStarterMessage);
await thread.send({
embeds: [
{
title: "Looking For Group",
type: EmbedType.Rich,
description: `Projects in this space must be open source licensed and may not be commercially monetized — this is a place for enthusiastic collaboration, and anyone found to be exploiting in any manner, especially for free labor, will be moderatated as a hostile actor.

Please do not routinely re-post your own skills. This is a forum, not a chat channel, prefer to bump your old post by replying to it (maybe with an update about what you've been working on?)

Reactiflux moderators cannot moderate behavior outside of the public channels. If you suspect someone is taking advantage of your generosity, block and move on. Before you accuse someone of being a bot or scammer, though, consider if there might be a language and cultural barrier.

Post authors: Once you've found collaborators or a project to contribute to, please lock your post to indicate that you're no longer seeking responses 🙏`,
color: EMBED_COLOR,
},
],
components: [
// @ts-expect-error Discord.js types appear to be wrong
new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setCustomId(LOCK_POST)
.setLabel("Lock post")
.setStyle(ButtonStyle.Danger),
),
],
});
color: EMBED_COLOR,
},
],
components: [
// @ts-expect-error Discord.js types appear to be wrong
new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setCustomId(LOCK_POST)
.setLabel("Lock post")
.setStyle(ButtonStyle.Danger),
),
],
});
} catch (e) {
if (e instanceof Error) {
logger.log("looking for group threadCreate: ", e);
}
}
});
};