Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add welcome emoji(s) to welcome messages #880

Merged
merged 2 commits into from
Nov 10, 2024
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
9 changes: 8 additions & 1 deletion src/discord/utils/trust.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,21 @@ but they were already marked at trusted in the database, so no message was sent`
const greeting = greetingList[Math.floor(Math.random() * greetingList.length)];

const channelLounge = await newMember.client.channels.fetch(env.CHANNEL_LOUNGE) as TextChannel;
await channelLounge.send({
const message = await channelLounge.send({
content: stripIndents`**${greeting}**
Head to <#${env.CHANNEL_TRIPSIT}> if you need a tripsitter. :)
Be safe, have fun, and don't forget to visit the <id:guide> for more information!

*${await topic()}*`,
});

try {
await message.react('<:ts_welcomeA:1222543903677485156>');
await message.react('<:ts_welcomeB:1222543905216663634>');
} catch (err) {
log.debug(F, 'Attempted to add welcome emojis to welcome message, but they appear to be missing.');
}

await db.members.upsert({
where: {
id_guild_id: {
Expand Down
Loading