Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
automatically set starboard channel topic
Browse files Browse the repository at this point in the history
  • Loading branch information
conaticus committed Jun 2, 2022
1 parent fb44339 commit 13e65ed
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/database/settings.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Prisma, Setting } from "@prisma/client";
import { TextChannel } from "discord.js";
import { getClient } from ".";
import { getSpecialChannel } from "./channels";

/**
* Get all settings for a specific guild
Expand Down Expand Up @@ -45,4 +47,12 @@ export const setSetting = async (
},
});
}

const starboardChannel = (await getSpecialChannel(
guildId,
"starboard"
)) as TextChannel;
starboardChannel.setTopic(
`a message requires ${settings.starboardThreshold} stars to make it to the starboard.`
);
};

0 comments on commit 13e65ed

Please sign in to comment.